diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-12-08 16:33:39 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-12-08 17:30:02 +0900 |
commit | 4aca77edde91f826aa243e268bf1ef5214530583 (patch) | |
tree | ef0cf1a95fcced00ca5fa40f3412c567bf95d705 /test/rubygems/test_gem_ext_ext_conf_builder.rb | |
parent | 6a6a24df9b72750d12f9b15192bdb7517e668efb (diff) |
Merge prepare version of RubyGems 3.2.0
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3864
Diffstat (limited to 'test/rubygems/test_gem_ext_ext_conf_builder.rb')
-rw-r--r-- | test/rubygems/test_gem_ext_ext_conf_builder.rb | 35 |
1 files changed, 9 insertions, 26 deletions
diff --git a/test/rubygems/test_gem_ext_ext_conf_builder.rb b/test/rubygems/test_gem_ext_ext_conf_builder.rb index 05ac538ec2..21fe27166b 100644 --- a/test/rubygems/test_gem_ext_ext_conf_builder.rb +++ b/test/rubygems/test_gem_ext_ext_conf_builder.rb @@ -29,12 +29,9 @@ class TestGemExtExtConfBuilder < Gem::TestCase output = [] - Dir.chdir @ext do - result = - Gem::Ext::ExtConfBuilder.build 'extconf.rb', @dest_path, output + result = Gem::Ext::ExtConfBuilder.build 'extconf.rb', @dest_path, output, [], nil, @ext - assert_same result, output - end + assert_same result, output assert_match(/^current directory:/, output[0]) assert_match(/^#{Gem.ruby}.* extconf.rb/, output[1]) @@ -59,9 +56,7 @@ class TestGemExtExtConfBuilder < Gem::TestCase output = [] - Dir.chdir @ext do - Gem::Ext::ExtConfBuilder.build 'extconf.rb', @dest_path, output - end + Gem::Ext::ExtConfBuilder.build 'extconf.rb', @dest_path, output, [], nil, @ext assert_equal "creating Makefile\n", output[2] assert_contains_make_command 'clean', output[4] @@ -86,9 +81,7 @@ class TestGemExtExtConfBuilder < Gem::TestCase output = [] assert_raises Gem::InstallError do - Dir.chdir @ext do - Gem::Ext::ExtConfBuilder.build 'extconf.rb', @dest_path, output - end + Gem::Ext::ExtConfBuilder.build 'extconf.rb', @dest_path, output, [], nil, @ext end assert_equal "creating Makefile\n", output[2] @@ -112,9 +105,7 @@ class TestGemExtExtConfBuilder < Gem::TestCase output = [] error = assert_raises Gem::InstallError do - Dir.chdir @ext do - Gem::Ext::ExtConfBuilder.build 'extconf.rb', @dest_path, output - end + Gem::Ext::ExtConfBuilder.build 'extconf.rb', @dest_path, output, [], nil, @ext end assert_equal 'extconf failed, exit code 1', error.message @@ -139,9 +130,7 @@ class TestGemExtExtConfBuilder < Gem::TestCase output = [] - Dir.chdir @ext do - Gem::Ext::ExtConfBuilder.build 'extconf.rb', @dest_path, output - end + Gem::Ext::ExtConfBuilder.build 'extconf.rb', @dest_path, output, [], nil, @ext refute_includes(output, "To see why this extension failed to compile, please check the mkmf.log which can be found here:\n") @@ -181,9 +170,7 @@ end output = [] - Dir.chdir @ext do - Gem::Ext::ExtConfBuilder.build 'extconf.rb', @dest_path, output - end + Gem::Ext::ExtConfBuilder.build 'extconf.rb', @dest_path, output, [], nil, @ext assert_contains_make_command 'clean', output[4] assert_contains_make_command '', output[7] @@ -207,9 +194,7 @@ end makefile.puts "install:" end - Dir.chdir @ext do - Gem::Ext::ExtConfBuilder.make @ext, output - end + Gem::Ext::ExtConfBuilder.make @ext, output, @ext assert_contains_make_command 'clean', output[1] assert_contains_make_command '', output[4] @@ -218,9 +203,7 @@ end def test_class_make_no_Makefile error = assert_raises Gem::InstallError do - Dir.chdir @ext do - Gem::Ext::ExtConfBuilder.make @ext, ['output'] - end + Gem::Ext::ExtConfBuilder.make @ext, ['output'], @ext end assert_equal 'Makefile not found', error.message |