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

[rubygems/rubygems] Relax test to still check we're calling the expected Ruby

* But not enforce that error looks like
  /full/path/to/ruby/bin/ruby: No such file or directory
  but instead allow
  truffleruby: No such file or directory

A typical output for gem_make.out looks like:
current directory: /.../rubygems/tmp/test_rubygems_112388/gemhome/gems/a-2
/.../ruby-2.6.6/bin/ruby -I /.../rubygems/lib -r ./siteconf20200422-112388-nyrcy0.rb extconf.rb ''
/.../ruby-2.6.6/bin/ruby: No such file or directory -- extconf.rb (LoadError)

https://github.com/rubygems/rubygems/commit/e6e08882cc
This commit is contained in:
Benoit Daloze 2020-04-22 22:17:50 +02:00 committed by Hiroshi SHIBATA
parent 5f0e84ba8d
commit 345461018d
Notes: git 2020-06-05 07:33:39 +09:00

View file

@ -233,15 +233,11 @@ install:
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}, cmd_make_out
assert_match %r{#{Regexp.escape Gem.ruby} .* extconf\.rb}, cmd_make_out
assert_match %r{: No such file}, 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 cmd_make_out.include? "#{Gem.ruby}:"
assert_match %r{#{Regexp.escape Gem.ruby}: No such file}, cmd_make_out
assert_equal cwd, Dir.pwd
end