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

Commit 60ad63c

Browse files
committed
Improve failure message when the exit status is not correct.
It is helpful to get the full output to see why we got an unexpected exit status.
1 parent c39e878 commit 60ad63c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

features/step_definitions/additional_cli_steps.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,10 @@
174174

175175
Then(/^bisect should (succeed|fail) with output like:$/) do |succeed, expected_output|
176176
last_process = only_processes.last
177-
expect(last_exit_status).to eq(succeed == "succeed" ? 0 : 1)
177+
expected_status = succeed == "succeed" ? 0 : 1
178+
expect(last_exit_status).to eq(expected_status),
179+
"Expected exit status of #{expected_status} but got #{last_exit_status} \n\n" \
180+
"Output:\n\n#{last_process.stdout}"
178181

179182
expected = normalize_durations(expected_output)
180183
actual = normalize_durations(last_process.stdout)

0 commit comments

Comments
 (0)