1
0
Fork 0
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:
Edgars Beigarts 2011-08-22 11:15:03 +03:00
parent 9dfe35b439
commit 5f4c537ed9

View file

@ -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