mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Make sure that exit codes of tests are propagated properly when using selenium webdriver.
This commit is contained in:
parent
9dfe35b439
commit
5f4c537ed9
1 changed files with 3 additions and 0 deletions
|
@ -16,7 +16,10 @@ class Capybara::Selenium::Driver < Capybara::Driver::Base
|
|||
|
||||
main = Process.pid
|
||||
at_exit do
|
||||
# Store the exit status of the test run since it goes away after calling the at_exit proc...
|
||||
@exit_status = $!.status if $!.is_a?(SystemExit)
|
||||
quit if Process.pid == main
|
||||
exit @exit_status if @exit_status # Force exit with stored status
|
||||
end
|
||||
end
|
||||
@browser
|
||||
|
|
Loading…
Reference in a new issue