aboutsummaryrefslogtreecommitdiffstats
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.rb18
1 files changed, 12 insertions, 6 deletions
diff --git a/test/rubygems/test_gem_platform.rb b/test/rubygems/test_gem_platform.rb
index e71fcd5c5d..aa23533a39 100644
--- a/test/rubygems/test_gem_platform.rb
+++ b/test/rubygems/test_gem_platform.rb
@@ -133,6 +133,12 @@ class TestGemPlatform < RubyGemTestCase
assert_equal '1', platform.version
end
+ def test_empty
+ platform = Gem::Platform.new 'cpu-other_platform1'
+ assert_respond_to platform, :empty?
+ assert_equal false, platform.empty?
+ end
+
def test_to_s
if win_platform? then
assert_equal 'x86-mswin32-60', Gem::Platform.local.to_s
@@ -155,8 +161,8 @@ class TestGemPlatform < RubyGemTestCase
other = Gem::Platform.new %w[cpu other_platform 1]
assert(my === my)
- assert !(other === my)
- assert !(my === other)
+ refute(other === my)
+ refute(my === other)
end
def test_equals3_cpu
@@ -167,10 +173,10 @@ class TestGemPlatform < RubyGemTestCase
util_set_arch 'powerpc-darwin8'
assert((ppc_darwin8 === Gem::Platform.local), 'powerpc =~ universal')
assert((uni_darwin8 === Gem::Platform.local), 'powerpc =~ universal')
- assert !(x86_darwin8 === Gem::Platform.local), 'powerpc =~ universal'
+ refute((x86_darwin8 === Gem::Platform.local), 'powerpc =~ universal')
util_set_arch 'i686-darwin8'
- assert !(ppc_darwin8 === Gem::Platform.local), 'powerpc =~ universal'
+ refute((ppc_darwin8 === Gem::Platform.local), 'powerpc =~ universal')
assert((uni_darwin8 === Gem::Platform.local), 'x86 =~ universal')
assert((x86_darwin8 === Gem::Platform.local), 'powerpc =~ universal')
@@ -191,8 +197,8 @@ class TestGemPlatform < RubyGemTestCase
assert((x86_darwin === Gem::Platform.local), 'x86_darwin === x86_darwin8')
assert((x86_darwin8 === Gem::Platform.local), 'x86_darwin8 === x86_darwin8')
- assert !(x86_darwin7 === Gem::Platform.local), 'x86_darwin7 === x86_darwin8'
- assert !(x86_darwin9 === Gem::Platform.local), 'x86_darwin9 === x86_darwin8'
+ refute((x86_darwin7 === Gem::Platform.local), 'x86_darwin7 === x86_darwin8')
+ refute((x86_darwin9 === Gem::Platform.local), 'x86_darwin9 === x86_darwin8')
end
def test_equals_tilde