1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[rubygems/rubygems] Extract gem_make_out contents to a variable

Co-authored-by: MSP-Greg <MSP-Greg@users.noreply.github.com>

https://github.com/rubygems/rubygems/commit/5f2b7474eb
This commit is contained in:
David Rodríguez 2020-05-02 12:00:18 +02:00 committed by Hiroshi SHIBATA
parent b1541606a2
commit a49a131163
Notes: git 2020-05-08 14:14:23 +09:00

View file

@ -233,19 +233,20 @@ install:
assert_equal '', @ui.error
gem_make_out = File.join @spec.extension_dir, 'gem_make.out'
cmd_make_out = File.read(gem_make_out)
assert_match %r{#{Regexp.escape Gem.ruby}.* extconf\.rb},
File.read(gem_make_out)
cmd_make_out
assert_match %r{: No such file},
File.read(gem_make_out)
cmd_make_out
refute_path_exists @spec.gem_build_complete_path
skip "Gem.ruby is not the name of the binary being run in the end" \
unless File.read(gem_make_out).include? "#{Gem.ruby}:"
unless cmd_make_out.include? "#{Gem.ruby}:"
assert_match %r{#{Regexp.escape Gem.ruby}: No such file},
File.read(gem_make_out)
cmd_make_out
assert_equal cwd, Dir.pwd
end