Skip to content

Commit

Permalink
Condense some artificially broken lines
Browse files Browse the repository at this point in the history
Co-authored-by: MSP-Greg <MSP-Greg@users.noreply.github.com>
  • Loading branch information
deivid-rodriguez and MSP-Greg committed May 2, 2020
1 parent 5f2b747 commit 5f39047
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions test/rubygems/test_gem_ext_builder.rb
Expand Up @@ -227,27 +227,21 @@ def test_build_extensions_extconf_bad
end

assert_match(/\AERROR: Failed to build gem native extension.$/, e.message)

assert_equal "Building native extensions. This could take a while...\n",
@ui.output
assert_equal "Building native extensions. This could take a while...\n", @ui.output
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},
cmd_make_out
assert_match %r{: No such file},
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_match %r{#{Regexp.escape Gem.ruby}: No such file}, cmd_make_out
assert_equal cwd, Dir.pwd
end

Expand All @@ -263,9 +257,7 @@ def test_build_extensions_unsupported
end

assert_match(/^\s*No builder for extension ''$/, e.message)

assert_equal "Building native extensions. This could take a while...\n",
@ui.output
assert_equal "Building native extensions. This could take a while...\n", @ui.output
assert_equal '', @ui.error

assert_equal "No builder for extension ''\n", File.read(gem_make_out)
Expand Down

0 comments on commit 5f39047

Please sign in to comment.