Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Generalize exit spec to depend less implementation-specific details #2949

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion spec/integration/spec_file_load_errors_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@
run_command "--require ./helper_with_exit.rb"
}.to raise_error(SystemExit)
output = normalize_durations(last_cmd_stdout)
# Remove extra line which is only shown on CRuby
output = output.sub("# ./helper_with_exit.rb:1:in `exit'\n", "")

if defined?(JRUBY_VERSION) && !JRUBY_VERSION.empty?
expect(output).to eq unindent(<<-EOS)

Expand All @@ -107,7 +110,6 @@

SystemExit:
exit
# ./helper_with_exit.rb:1:in `exit'
# ./helper_with_exit.rb:1#{spec_line_suffix}
EOS
end
Expand Down