summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_requirement.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rubygems/test_gem_requirement.rb')
-rw-r--r--test/rubygems/test_gem_requirement.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_requirement.rb b/test/rubygems/test_gem_requirement.rb
index c8490de..b646171 100644
--- a/test/rubygems/test_gem_requirement.rb
+++ b/test/rubygems/test_gem_requirement.rb
@@ -256,6 +256,19 @@ class TestGemRequirement < Gem::TestCase
refute_satisfied_by "2.0", "~> 1.4.4"
end
+ def test_specific
+ refute req('> 1') .specific?
+ refute req('>= 1').specific?
+
+ assert req('!= 1').specific?
+ assert req('< 1') .specific?
+ assert req('<= 1').specific?
+ assert req('= 1') .specific?
+ assert req('~> 1').specific?
+
+ assert req('> 1', '> 2').specific? # GIGO
+ end
+
def test_bad
refute_satisfied_by "", "> 0.1"
refute_satisfied_by "1.2.3", "!= 1.2.3"