From 8289771e326006cc4e15a667e3eff3a72cfb3327 Mon Sep 17 00:00:00 2001 From: drbrain Date: Thu, 20 Dec 2007 08:39:12 +0000 Subject: Import RubyGems 1.0.0, r1575 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/rubygems/test_gem_platform.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'test/rubygems/test_gem_platform.rb') diff --git a/test/rubygems/test_gem_platform.rb b/test/rubygems/test_gem_platform.rb index a1462d4dcd..648c2a9f36 100644 --- a/test/rubygems/test_gem_platform.rb +++ b/test/rubygems/test_gem_platform.rb @@ -5,6 +5,19 @@ require 'rbconfig' class TestGemPlatform < RubyGemTestCase + def test_self_const_missing + consts = [:DARWIN, :LINUX_586, :MSWIN32, :PPC_DARWIN, :WIN32, :X86_LINUX] + + consts.each do |const| + e = assert_raise NameError do + Gem::Platform.const_missing const + end + + assert_equal "#{const} has been removed, use CURRENT instead", + e.message + end + end + def test_self_local util_set_arch 'i686-darwin8.10.1' @@ -60,6 +73,10 @@ class TestGemPlatform < RubyGemTestCase 'i386-mingw32' => ['x86', 'mingw32', nil], 'i386-mswin32' => ['x86', 'mswin32', nil], 'i386-mswin32_80' => ['x86', 'mswin32', '80'], + 'i386-mswin32-80' => ['x86', 'mswin32', '80'], + 'x86-mswin32' => ['x86', 'mswin32', nil], + 'x86-mswin32_60' => ['x86', 'mswin32', '60'], + 'x86-mswin32-60' => ['x86', 'mswin32', '60'], 'i386-netbsdelf' => ['x86', 'netbsdelf', nil], 'i386-openbsd4.0' => ['x86', 'openbsd', '4.0'], 'i386-solaris2.10' => ['x86', 'solaris', '2.10'], -- cgit v1.2.3