summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_resolver_vendor_set.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-14 03:30:02 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-14 03:30:02 +0000
commit4de117a61517e839f2c45eaf45d56fc243d6d5b2 (patch)
tree7cb5af7a7eb513e5dddf5e343746b1611e628387 /test/rubygems/test_gem_resolver_vendor_set.rb
parente548c09d429a5136285ea81aed418685359ed124 (diff)
* 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_resolver_vendor_set.rb')
-rw-r--r--test/rubygems/test_gem_resolver_vendor_set.rb18
1 files changed, 17 insertions, 1 deletions
diff --git a/test/rubygems/test_gem_resolver_vendor_set.rb b/test/rubygems/test_gem_resolver_vendor_set.rb
index 4c1e146..618e251 100644
--- a/test/rubygems/test_gem_resolver_vendor_set.rb
+++ b/test/rubygems/test_gem_resolver_vendor_set.rb
@@ -11,10 +11,12 @@ class TestGemResolverVendorSet < Gem::TestCase
def test_add_vendor_gem
name, version, directory = vendor_gem
- @set.add_vendor_gem name, directory
+ added = @set.add_vendor_gem name, directory
spec = @set.load_spec name, version, Gem::Platform::RUBY, nil
+ assert_equal spec, added
+
assert_equal "#{name}-#{version}", spec.full_name
assert_equal File.expand_path(directory), spec.full_gem_path
@@ -55,6 +57,20 @@ class TestGemResolverVendorSet < Gem::TestCase
assert_equal expected, found
end
+ def test_find_all_prerelease
+ name, _, directory = vendor_gem 'a', '1.a'
+
+ @set.add_vendor_gem name, directory
+
+ req = Gem::Resolver::DependencyRequest.new dep('a'), nil
+
+ assert_empty @set.find_all req
+
+ req = Gem::Resolver::DependencyRequest.new dep('a', '>= 0.a'), nil
+
+ refute_empty @set.find_all req
+ end
+
def test_load_spec
error = Object.const_defined?(:KeyError) ? KeyError : IndexError