Skip to content

Allow at_exit handlers to run when aborting runs

gitlab-qa-bot requested to merge github/fork/jdelStrother/at_exit into master

Created by: jdelStrother

At the moment, if you hit Ctrl-C twice to abort a run, rspec uses exit! to exit, so at_exit handlers aren't run. This means, for example, that Capybara doesn't send a quit message to its browser, so I often end up with dead Google Chrome processes lying around.

I'm not sure what the rational was for choosing exit! vs exit (/cc @dchelimsky ?), so I'm not 100% convinced this PR is correct/desired behaviour. Would welcome any thoughts on it.

Merge request reports