summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_platform.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rubygems/test_gem_platform.rb')
-rw-r--r--test/rubygems/test_gem_platform.rb25
1 files changed, 6 insertions, 19 deletions
diff --git a/test/rubygems/test_gem_platform.rb b/test/rubygems/test_gem_platform.rb
index 362a366266..fdb8fb11ed 100644
--- a/test/rubygems/test_gem_platform.rb
+++ b/test/rubygems/test_gem_platform.rb
@@ -1,5 +1,4 @@
require File.join(File.expand_path(File.dirname(__FILE__)), 'gemutilities')
-require 'test/unit'
require 'rubygems/platform'
require 'rbconfig'
@@ -147,8 +146,8 @@ class TestGemPlatform < RubyGemTestCase
other = Gem::Platform.new %w[cpu other_platform 1]
assert_equal my, my
- assert_not_equal my, other
- assert_not_equal other, my
+ refute_equal my, other
+ refute_equal other, my
end
def test_equals3
@@ -205,10 +204,10 @@ class TestGemPlatform < RubyGemTestCase
# oddballs
assert_match 'i386-mswin32-mq5.3', Gem::Platform.local
assert_match 'i386-mswin32-mq6', Gem::Platform.local
- deny_match 'win32-1.8.2-VC7', Gem::Platform.local
- deny_match 'win32-1.8.4-VC6', Gem::Platform.local
- deny_match 'win32-source', Gem::Platform.local
- deny_match 'windows', Gem::Platform.local
+ refute_match 'win32-1.8.2-VC7', Gem::Platform.local
+ refute_match 'win32-1.8.4-VC6', Gem::Platform.local
+ refute_match 'win32-source', Gem::Platform.local
+ refute_match 'windows', Gem::Platform.local
util_set_arch 'i686-linux'
assert_match 'i486-linux', Gem::Platform.local
@@ -236,17 +235,5 @@ class TestGemPlatform < RubyGemTestCase
assert_match 'sparc-solaris2.8-mq5.3', Gem::Platform.local
end
- def assert_match(pattern, platform, message = '')
- full_message = build_message message, "<?> expected to be =~\n<?>.",
- platform, pattern
- assert_block(full_message) { platform =~ pattern }
- end
-
- def deny_match(pattern, platform, message = '')
- full_message = build_message message, "<?> expected to be !~\n<?>.",
- platform, pattern
- assert_block(full_message) { platform !~ pattern }
- end
-
end