summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_ext_ext_conf_builder.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-09 21:38:59 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-09 21:38:59 +0000
commit31c94ffeb5f09d09ac2c86fc9e6614e38251a43d (patch)
tree10e44506238c7af3d7c9d822111996731726e38d /test/rubygems/test_gem_ext_ext_conf_builder.rb
parenta6afbaeb3be396c0fdea3b9077d9256c59edcfca (diff)
Update to RubyGems 1.3.4 r2223
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_ext_ext_conf_builder.rb')
-rw-r--r--test/rubygems/test_gem_ext_ext_conf_builder.rb22
1 files changed, 14 insertions, 8 deletions
diff --git a/test/rubygems/test_gem_ext_ext_conf_builder.rb b/test/rubygems/test_gem_ext_ext_conf_builder.rb
index d178c1f737..e815a6555f 100644
--- a/test/rubygems/test_gem_ext_ext_conf_builder.rb
+++ b/test/rubygems/test_gem_ext_ext_conf_builder.rb
@@ -14,6 +14,10 @@ class TestGemExtExtConfBuilder < RubyGemTestCase
end
def test_class_build
+ if vc_windows? && !nmake_found?
+ skip("test_class_build skipped - nmake not found")
+ end
+
File.open File.join(@ext, 'extconf.rb'), 'w' do |extconf|
extconf.puts "require 'mkmf'\ncreate_makefile 'foo'"
end
@@ -46,6 +50,10 @@ class TestGemExtExtConfBuilder < RubyGemTestCase
end
def test_class_build_extconf_fail
+ if vc_windows? && !nmake_found?
+ skip("test_class_build_extconf_fail skipped - nmake not found")
+ end
+
File.open File.join(@ext, 'extconf.rb'), 'w' do |extconf|
extconf.puts "require 'mkmf'"
extconf.puts "have_library 'nonexistent' or abort 'need libnonexistent'"
@@ -69,6 +77,10 @@ checking for main\(\) in .*?nonexistent/m, error.message)
end
def test_class_make
+ if vc_windows? && !nmake_found?
+ skip("test_class_make skipped - nmake not found")
+ end
+
output = []
makefile_path = File.join(@ext, 'Makefile')
File.open makefile_path, 'w' do |makefile|
@@ -82,14 +94,8 @@ checking for main\(\) in .*?nonexistent/m, error.message)
Gem::Ext::ExtConfBuilder.make @ext, output
end
- case RUBY_PLATFORM
- when /mswin/ then
- assert_equal 'nmake', output[0]
- assert_equal 'nmake install', output[2]
- else
- assert_equal 'make', output[0]
- assert_equal 'make install', output[2]
- end
+ assert_equal make_command, output[0]
+ assert_equal "#{make_command} install", output[2]
edited_makefile = <<-EOF
RUBYARCHDIR = #{@ext}$(target_prefix)