Skip to content

Commit

Permalink
Tighten output check in Cucumber step testing RSpec success
Browse files Browse the repository at this point in the history
This change ensures no errors were reported, and that both checks are
performed before reporting any failures.
  • Loading branch information
mvz committed Nov 15, 2024
1 parent 1525fdc commit 74971f1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/aruba/cucumber/testing_frameworks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@

# RSpec
Then(/^the spec(?:s)? should all pass$/) do
step 'the output should contain "0 failures"'
step 'the exit status should be 0'
aggregate_failures do
expect(last_command_stopped)
.to have_output an_output_string_matching('examples?, 0 failures')
expect(last_command_stopped).to have_exit_status 0
end
end

# RSpec
Expand Down

0 comments on commit 74971f1

Please sign in to comment.