aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-12 04:50:06 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-12 04:50:06 +0000
commita2ba489e2eff648b98054b1252e45a3c0643ab8e (patch)
tree58f10e4d9889404e62192b90809755c667c567e7 /test/rubygems
parent8b129406c606800888610403f1afb57baeb515e2 (diff)
downloadruby-a2ba489e2eff648b98054b1252e45a3c0643ab8e.tar.gz
* 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
Diffstat (limited to 'test/rubygems')
-rw-r--r--test/rubygems/test_gem_config_file.rb2
-rw-r--r--test/rubygems/test_gem_stub_specification.rb16
2 files changed, 10 insertions, 8 deletions
diff --git a/test/rubygems/test_gem_config_file.rb b/test/rubygems/test_gem_config_file.rb
index 5077f37359..3ababfbbfd 100644
--- a/test/rubygems/test_gem_config_file.rb
+++ b/test/rubygems/test_gem_config_file.rb
@@ -416,7 +416,7 @@ if you believe they were disclosed to a third party.
def test_ignore_invalid_config_file
File.open @temp_conf, 'w' do |fp|
- fp.puts "some-non-yaml-hash-string"
+ fp.puts "invalid: yaml:"
end
begin
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?