aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_ext_ext_conf_builder.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-16 00:14:16 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-16 00:14:16 +0000
commit28918eac58eb6e2681d10839ac0d1430b2a4f1f9 (patch)
tree3c2c9e36118efe1d9406acdd14c186788879bea3 /test/rubygems/test_gem_ext_ext_conf_builder.rb
parentcfe1458078b8cf36e490c516977c52e1faa9e88a (diff)
downloadruby-28918eac58eb6e2681d10839ac0d1430b2a4f1f9.tar.gz
* lib/rubygems: Update to RubyGems master commit 2a74263. This fixes
several bugs in RubyGems 2.2.0.preview.1. * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43298 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.rb39
1 files changed, 18 insertions, 21 deletions
diff --git a/test/rubygems/test_gem_ext_ext_conf_builder.rb b/test/rubygems/test_gem_ext_ext_conf_builder.rb
index dfbf3fe1b9..aa9008c793 100644
--- a/test/rubygems/test_gem_ext_ext_conf_builder.rb
+++ b/test/rubygems/test_gem_ext_ext_conf_builder.rb
@@ -35,8 +35,9 @@ class TestGemExtExtConfBuilder < Gem::TestCase
assert_match(/^#{Gem.ruby} extconf.rb/, output[0])
assert_equal "creating Makefile\n", output[1]
- assert_contains_make_command '', output[2]
- assert_contains_make_command 'install', output[4]
+ assert_contains_make_command 'clean', output[2]
+ assert_contains_make_command '', output[4]
+ assert_contains_make_command 'install', output[6]
assert_empty Dir.glob(File.join(@ext, 'siteconf*.rb'))
end
@@ -54,8 +55,9 @@ class TestGemExtExtConfBuilder < Gem::TestCase
end
assert_equal "creating Makefile\n", output[1]
- assert_contains_make_command '', output[2]
- assert_contains_make_command 'install', output[4]
+ assert_contains_make_command 'clean', output[2]
+ assert_contains_make_command '', output[4]
+ assert_contains_make_command 'install', output[6]
ensure
RbConfig::CONFIG['configure_args'] = configure_args
end
@@ -77,8 +79,8 @@ class TestGemExtExtConfBuilder < Gem::TestCase
end
end
- assert_equal "creating Makefile\n", output[1]
- assert_contains_make_command '', output[2]
+ assert_equal "creating Makefile\n", output[1]
+ assert_contains_make_command 'clean', output[2]
ensure
RbConfig::CONFIG['configure_args'] = configure_args
ENV['make'] = env_make
@@ -103,10 +105,7 @@ class TestGemExtExtConfBuilder < Gem::TestCase
end
end
- assert_match(/\Aextconf failed:
-
-#{Gem.ruby} extconf.rb.*
-checking for main\(\) in .*?nonexistent/m, error.message)
+ assert_equal 'extconf failed, exit code 1', error.message
assert_equal("#{Gem.ruby} extconf.rb", output[0])
end
@@ -130,6 +129,7 @@ ruby =
open 'Makefile', 'w' do |io|
io.write <<-Makefile
+clean: ruby
all: ruby
install: ruby
@@ -147,8 +147,9 @@ end
Gem::Ext::ExtConfBuilder.build 'extconf.rb', nil, @dest_path, output
end
- assert_contains_make_command '', output[2]
- assert_contains_make_command 'install', output[4]
+ assert_contains_make_command 'clean', output[2]
+ assert_contains_make_command '', output[4]
+ assert_contains_make_command 'install', output[6]
assert_empty Dir.glob(File.join(@ext, 'siteconf*.rb'))
end
@@ -163,6 +164,7 @@ end
makefile.puts "# π"
makefile.puts "RUBYARCHDIR = $(foo)$(target_prefix)"
makefile.puts "RUBYLIBDIR = $(bar)$(target_prefix)"
+ makefile.puts "clean:"
makefile.puts "all:"
makefile.puts "install:"
end
@@ -171,8 +173,9 @@ end
Gem::Ext::ExtConfBuilder.make @ext, output
end
- assert_contains_make_command '', output[0]
- assert_contains_make_command 'install', output[2]
+ assert_contains_make_command 'clean', output[0]
+ assert_contains_make_command '', output[2]
+ assert_contains_make_command 'install', output[4]
end
def test_class_make_no_Makefile
@@ -182,13 +185,7 @@ end
end
end
- expected = <<-EOF.strip
-Makefile not found:
-
-output
- EOF
-
- assert_equal expected, error.message
+ assert_equal 'Makefile not found', error.message
end
end