diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-18 21:56:18 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-18 21:56:18 +0000 |
commit | 08aa6d59a2bc35556125d373f90f5286440c6f84 (patch) | |
tree | 532694033c6b495c4355b9f35a1a8b60497ad103 /test/rubygems/test_gem_stub_specification.rb | |
parent | 9f9b47671052072a305275b99d7e132cf17fbc79 (diff) |
* lib/rubygems: Update to RubyGems master 0a3814b. Changes:
Fixed extension directory in Gem::Specification#require_paths.
Allow installation of gems when $HOME is nonexistent or unwritable.
Use proper API in InstallCommand.
Improve support for path option in gem dependency files.
Remove warnings.
* test/rubygems: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_stub_specification.rb')
-rw-r--r-- | test/rubygems/test_gem_stub_specification.rb | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/test/rubygems/test_gem_stub_specification.rb b/test/rubygems/test_gem_stub_specification.rb index e315e2c01a..8f9cadbcf3 100644 --- a/test/rubygems/test_gem_stub_specification.rb +++ b/test/rubygems/test_gem_stub_specification.rb @@ -17,6 +17,7 @@ class TestStubSpecification < Gem::TestCase assert_equal Gem::Version.new("0.0.1"), @foo.version assert_equal Gem::Platform.new("mswin32"), @foo.platform assert_equal ["lib", "lib/f oo/ext"], @foo.require_paths + assert @foo.stubbed? end def test_initialize_extension @@ -24,17 +25,16 @@ class TestStubSpecification < Gem::TestCase gem_dir = File.join stub.gems_dir, stub.full_name - lib = Pathname File.join gem_dir, 'lib' + ext_install_dir = Pathname(stub.extension_install_dir) + full_gem_path = Pathname(stub.full_gem_path) + relative_install_dir = ext_install_dir.relative_path_from full_gem_path + relative_install_dir = relative_install_dir.to_s - ext_install_dir = - Pathname(stub.extension_install_dir).relative_path_from lib - ext_install_dir = ext_install_dir.to_s - - assert_equal 'stub_e', stub.name - assert_equal v(2), stub.version - assert_equal Gem::Platform::RUBY, stub.platform - assert_equal ['lib', ext_install_dir], stub.require_paths - assert_equal %w[ext/stub_e/extconf.rb], stub.extensions + assert_equal 'stub_e', stub.name + assert_equal v(2), stub.version + assert_equal Gem::Platform::RUBY, stub.platform + assert_equal ['lib', relative_install_dir], stub.require_paths + assert_equal %w[ext/stub_e/extconf.rb], stub.extensions end def test_initialize_missing_stubline @@ -43,6 +43,7 @@ class TestStubSpecification < Gem::TestCase assert_equal Gem::Version.new("0.0.2"), stub.version assert_equal Gem::Platform.new("ruby"), stub.platform assert_equal ["lib"], stub.require_paths + assert !stub.stubbed? end def test_contains_requirable_file_eh |