summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_version.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rubygems/test_gem_version.rb')
-rw-r--r--test/rubygems/test_gem_version.rb13
1 files changed, 1 insertions, 12 deletions
diff --git a/test/rubygems/test_gem_version.rb b/test/rubygems/test_gem_version.rb
index 46453cd9e9..9898669ce6 100644
--- a/test/rubygems/test_gem_version.rb
+++ b/test/rubygems/test_gem_version.rb
@@ -65,8 +65,7 @@ class TestGemVersion < Gem::TestCase
def test_hash
assert_equal v("1.2").hash, v("1.2").hash
refute_equal v("1.2").hash, v("1.3").hash
- assert_equal v("1.2").hash, v("1.2.0").hash
- assert_equal v("1.2.pre.1").hash, v("1.2.0.pre.1.0").hash
+ refute_equal v("1.2").hash, v("1.2.0").hash
end
def test_initialize
@@ -100,9 +99,6 @@ class TestGemVersion < Gem::TestCase
assert_prerelease '1.A'
- assert_prerelease '1-1'
- assert_prerelease '1-a'
-
refute_prerelease "1.2.0"
refute_prerelease "2.9"
refute_prerelease "22.1.50.0"
@@ -158,12 +154,6 @@ class TestGemVersion < Gem::TestCase
assert_equal [9,8,7], v("9.8.7").segments
end
- def test_canonical_segments
- assert_equal [1], v("1.0.0").canonical_segments
- assert_equal [1, "a", 1], v("1.0.0.a.1.0").canonical_segments
- assert_equal [1, 2, 3, "pre", 1], v("1.2.3-1").canonical_segments
- end
-
# Asserts that +version+ is a prerelease.
def assert_prerelease version
@@ -193,7 +183,6 @@ class TestGemVersion < Gem::TestCase
def assert_version_equal expected, actual
assert_equal v(expected), v(actual)
- assert_equal v(expected).hash, v(actual).hash, "since #{actual} == #{expected}, they must have the same hash"
end
# Assert that two versions are eql?. Checks both directions.