summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_ext_configure_builder.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rubygems/test_gem_ext_configure_builder.rb')
-rw-r--r--test/rubygems/test_gem_ext_configure_builder.rb18
1 files changed, 8 insertions, 10 deletions
diff --git a/test/rubygems/test_gem_ext_configure_builder.rb b/test/rubygems/test_gem_ext_configure_builder.rb
index 6137795111..34e9fccd46 100644
--- a/test/rubygems/test_gem_ext_configure_builder.rb
+++ b/test/rubygems/test_gem_ext_configure_builder.rb
@@ -6,7 +6,8 @@ class TestGemExtConfigureBuilder < Gem::TestCase
def setup
super
- @makefile_body = "all:\n\t@echo ok\ninstall:\n\t@echo ok"
+ @makefile_body =
+ "clean:\n\t@echo ok\nall:\n\t@echo ok\ninstall:\n\t@echo ok"
@ext = File.join @tempdir, 'ext'
@dest_path = File.join @tempdir, 'prefix'
@@ -30,6 +31,8 @@ class TestGemExtConfigureBuilder < Gem::TestCase
assert_equal "sh ./configure --prefix=#{@dest_path}", output.shift
assert_equal "", output.shift
+ assert_contains_make_command 'clean', output.shift
+ assert_match(/^ok$/m, output.shift)
assert_contains_make_command '', output.shift
assert_match(/^ok$/m, output.shift)
assert_contains_make_command 'install', output.shift
@@ -49,13 +52,7 @@ class TestGemExtConfigureBuilder < Gem::TestCase
shell_error_msg = %r{(\./configure: .*)|((?:Can't|cannot) open \./configure(?:: No such file or directory)?)}
sh_prefix_configure = "sh ./configure --prefix="
- expected = %r(configure failed:
-
-#{Regexp.escape sh_prefix_configure}#{Regexp.escape @dest_path}
-(?:.*?: )?#{shell_error_msg}
-)
-
- assert_match expected, error.message
+ assert_match 'configure failed', error.message
assert_equal "#{sh_prefix_configure}#{@dest_path}", output.shift
assert_match %r(#{shell_error_msg}), output.shift
@@ -76,8 +73,9 @@ class TestGemExtConfigureBuilder < Gem::TestCase
Gem::Ext::ConfigureBuilder.build nil, nil, @dest_path, 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
end