diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-14 03:30:02 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-14 03:30:02 +0000 |
commit | 4de117a61517e839f2c45eaf45d56fc243d6d5b2 (patch) | |
tree | 7cb5af7a7eb513e5dddf5e343746b1611e628387 /test/rubygems/test_gem_available_set.rb | |
parent | e548c09d429a5136285ea81aed418685359ed124 (diff) | |
download | ruby-4de117a61517e839f2c45eaf45d56fc243d6d5b2.tar.gz |
* lib/rubygems: Update to RubyGems 2.4.1 master(713ab65)
Complete history at:
https://github.com/rubygems/rubygems/blob/master/History.txt#L3-L216
* test/rubygems: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_available_set.rb')
-rw-r--r-- | test/rubygems/test_gem_available_set.rb | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/test/rubygems/test_gem_available_set.rb b/test/rubygems/test_gem_available_set.rb index 9c204d046b..2b515447a3 100644 --- a/test/rubygems/test_gem_available_set.rb +++ b/test/rubygems/test_gem_available_set.rb @@ -3,6 +3,7 @@ require 'rubygems/available_set' require 'rubygems/security' class TestGemAvailableSet < Gem::TestCase + def setup super @@ -23,22 +24,24 @@ class TestGemAvailableSet < Gem::TestCase end def test_find_all - a1, a1_gem = util_gem 'a', 1 + a1, a1_gem = util_gem 'a', 1 + a1a, a1a_gem = util_gem 'a', '1.a' - source = Gem::Source::SpecificFile.new a1_gem + a1_source = Gem::Source::SpecificFile.new a1_gem + a1a_source = Gem::Source::SpecificFile.new a1a_gem set = Gem::AvailableSet.new - set.add a1, source + set.add a1, a1_source + set.add a1a, a1a_source dep = Gem::Resolver::DependencyRequest.new dep('a'), nil - specs = set.find_all dep - - spec = specs.first + assert_equal %w[a-1], set.find_all(dep).map { |spec| spec.full_name } - assert_kind_of Gem::Resolver::LocalSpecification, spec + dep = Gem::Resolver::DependencyRequest.new dep('a', '>= 0.a'), nil - assert_equal 'a-1', spec.full_name + assert_equal %w[a-1 a-1.a], + set.find_all(dep).map { |spec| spec.full_name }.sort end def test_match_platform |