From a2ba489e2eff648b98054b1252e45a3c0643ab8e Mon Sep 17 00:00:00 2001 From: hsbt Date: Thu, 12 Nov 2015 04:50:06 +0000 Subject: * lib/rubygems: Update to RubyGems 2.5.0+ HEAD(db78980). this version includes #1367 , #1373 , #1375 * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/rubygems/test_gem_stub_specification.rb | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'test/rubygems/test_gem_stub_specification.rb') diff --git a/test/rubygems/test_gem_stub_specification.rb b/test/rubygems/test_gem_stub_specification.rb index e1ab8342dd..5488adc348 100644 --- a/test/rubygems/test_gem_stub_specification.rb +++ b/test/rubygems/test_gem_stub_specification.rb @@ -9,7 +9,9 @@ class TestStubSpecification < Gem::TestCase def setup super - @foo = Gem::StubSpecification.gemspec_stub FOO + @base_dir = File.dirname(SPECIFICATIONS) + @gems_dir = File.join File.dirname(SPECIFICATIONS), 'gem' + @foo = Gem::StubSpecification.gemspec_stub FOO, @base_dir, @gems_dir end def test_initialize @@ -31,7 +33,7 @@ class TestStubSpecification < Gem::TestCase end def test_initialize_missing_stubline - stub = Gem::StubSpecification.gemspec_stub(BAR) + stub = Gem::StubSpecification.gemspec_stub(BAR, @base_dir, @gems_dir) assert_equal "bar", stub.name assert_equal Gem::Version.new("0.0.2"), stub.version assert_equal Gem::Platform.new("ruby"), stub.platform @@ -118,7 +120,7 @@ class TestStubSpecification < Gem::TestCase io.write spec.to_ruby_for_cache end - default_spec = Gem::StubSpecification.gemspec_stub spec.loaded_from + default_spec = Gem::StubSpecification.gemspec_stub spec.loaded_from, spec.base_dir, spec.gems_dir refute default_spec.missing_extensions? end @@ -140,7 +142,7 @@ class TestStubSpecification < Gem::TestCase def test_to_spec_with_other_specs_loaded_does_not_warn real_foo = util_spec @foo.name, @foo.version real_foo.activate - bar = Gem::StubSpecification.gemspec_stub BAR + bar = Gem::StubSpecification.gemspec_stub BAR, real_foo.base_dir, real_foo.gems_dir refute_predicate Gem.loaded_specs, :empty? assert bar.to_spec end @@ -148,7 +150,7 @@ class TestStubSpecification < Gem::TestCase def test_to_spec_activated assert @foo.to_spec.is_a?(Gem::Specification) assert_equal "foo", @foo.to_spec.name - refute @foo.to_spec.instance_variable_defined? :@ignored + refute @foo.to_spec.instance_variable_get :@ignored end def test_to_spec_missing_extensions @@ -179,7 +181,7 @@ end io.flush - stub = Gem::StubSpecification.gemspec_stub io.path + stub = Gem::StubSpecification.gemspec_stub io.path, @gemhome, File.join(@gemhome, 'gems') yield stub if block_given? @@ -202,7 +204,7 @@ end io.flush - stub = Gem::StubSpecification.gemspec_stub io.path + stub = Gem::StubSpecification.gemspec_stub io.path, @gemhome, File.join(@gemhome, 'gems') yield stub if block_given? -- cgit v1.2.3