summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_specification.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-06 06:01:14 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-06 06:01:14 +0000
commit469bac0f9233d8ad2b53bea2f382578634fabf65 (patch)
treeecb999b03efbe4272614f2ffb4069a3f2b8bbabe /test/rubygems/test_gem_specification.rb
parentea736d55f9596e79184b9b4ade439c71530e86d8 (diff)
* lib/rubygems.rb, lib/rubygems/*, test/rubygems/*: Update rubygems-2.6.3.
Please see entries of 2.6.3 on https://github.com/rubygems/rubygems/blob/master/History.txt git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_specification.rb')
-rw-r--r--test/rubygems/test_gem_specification.rb15
1 files changed, 13 insertions, 2 deletions
diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb
index bc1c8d2ca7..8598e924ff 100644
--- a/test/rubygems/test_gem_specification.rb
+++ b/test/rubygems/test_gem_specification.rb
@@ -100,6 +100,17 @@ end
load 'rubygems/syck_hack.rb'
end
+ def test_self_find_active_stub_by_path
+ spec = new_spec('a', '1', nil, 'lib/foo.rb')
+ spec.activated = true
+
+ # There used to be a bug (introduced in a9c1aaf) when Gem::Specification
+ # objects are present in the @stubs collection. This test verifies that
+ # this scenario works correctly.
+ Gem::Specification.all = [spec]
+ Gem::Specification.find_active_stub_by_path('foo')
+ end
+
def test_self_activate
foo = util_spec 'foo', '1'
@@ -3373,7 +3384,7 @@ end
assert Gem::Specification.find_by_name "a", "1"
assert Gem::Specification.find_by_name "a", ">1"
- assert_raises Gem::LoadError do
+ assert_raises Gem::MissingSpecError do
Gem::Specification.find_by_name "monkeys"
end
end
@@ -3387,7 +3398,7 @@ end
assert Gem::Specification.find_by_name "b"
- assert_raises Gem::LoadError do
+ assert_raises Gem::MissingSpecVersionError do
Gem::Specification.find_by_name "b", "1"
end