summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_dependency.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rubygems/test_gem_dependency.rb')
-rw-r--r--test/rubygems/test_gem_dependency.rb29
1 files changed, 21 insertions, 8 deletions
diff --git a/test/rubygems/test_gem_dependency.rb b/test/rubygems/test_gem_dependency.rb
index b4a21b8..a77ddf5 100644
--- a/test/rubygems/test_gem_dependency.rb
+++ b/test/rubygems/test_gem_dependency.rb
@@ -67,16 +67,20 @@ class TestGemDependency < Gem::TestCase
assert_match d, d, "match self"
assert_match dep("a", ">= 0"), d, "match version exact"
assert_match dep("a", ">= 0"), dep("a", "1"), "match version"
- assert_match dep(/a/, ">= 0"), d, "match simple regexp"
- assert_match dep(/a|b/, ">= 0"), d, "match scary regexp"
-
- refute_match dep(/a/), dep("b")
refute_match dep("a"), Object.new
+
+ Deprecate.skip_during do
+ assert_match dep(/a/, ">= 0"), d, "match simple regexp"
+ assert_match dep(/a|b/, ">= 0"), d, "match scary regexp"
+ refute_match dep(/a/), dep("b")
+ end
end
def test_equals_tilde_escape
refute_match dep("a|b"), dep("a", "1")
- assert_match dep(/a|b/), dep("a", "1")
+ Deprecate.skip_during do
+ assert_match dep(/a|b/), dep("a", "1")
+ end
end
def test_equals_tilde_object
@@ -90,9 +94,11 @@ class TestGemDependency < Gem::TestCase
def test_equals_tilde_spec
assert_match dep("a", ">= 0"), spec("a", "0")
assert_match dep("a", "1"), spec("a", "1")
- assert_match dep(/a/, ">= 0"), spec("a", "0")
- assert_match dep(/a|b/, ">= 0"), spec("b", "0")
- refute_match dep(/a/, ">= 0"), spec("b", "0")
+ Deprecate.skip_during do
+ assert_match dep(/a/, ">= 0"), spec("a", "0")
+ assert_match dep(/a|b/, ">= 0"), spec("b", "0")
+ refute_match dep(/a/, ">= 0"), spec("b", "0")
+ end
end
def test_hash
@@ -166,5 +172,12 @@ class TestGemDependency < Gem::TestCase
assert d.prerelease?
end
+
+ def test_specific
+ refute dep('a', '> 1').specific?
+
+ assert dep('a', '= 1').specific?
+ end
+
end