From 28918eac58eb6e2681d10839ac0d1430b2a4f1f9 Mon Sep 17 00:00:00 2001 From: drbrain Date: Wed, 16 Oct 2013 00:14:16 +0000 Subject: * 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 --- test/rubygems/test_gem_ext_configure_builder.rb | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'test/rubygems/test_gem_ext_configure_builder.rb') 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 -- cgit v1.2.3