Last active
December 16, 2015 01:19
-
-
Save NaN1488/5354688 to your computer and use it in GitHub Desktop.
Tell Cucumber to quit after a scenario is done - if it failed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tell Cucumber to quit after a scenario is done - if it failed. | |
# $ cucumber EXIT_WHEN_FAIL=1 | |
# Note: Please take in account the advantage of tags when working with a specific scenario before implemebt this! | |
After do |s| | |
if s.failed? && ENV.include?('EXIT_WHEN_FAIL') && ENV['EXIT_WHEN_FAIL'] == '1' | |
Cucumber.wants_to_quit = true | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment