diff options
| author | Rafael França <rafaelmfranca@gmail.com> | 2018-11-13 17:21:04 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-13 17:21:04 -0500 |
| commit | 6741e70518b55c4bbd7a53346b5937319a31a15f (patch) | |
| tree | 79904838dbcaaced3a5567ff80d5ac872acf442e /actionpack/lib/action_dispatch/system_testing | |
| parent | 5e9a3e7763673c0e5f58bdfbe2263d135198e9d7 (diff) | |
| parent | 59895db44b73b9a333387eee2078fda8feec9ce5 (diff) | |
| download | rails-6741e70518b55c4bbd7a53346b5937319a31a15f.tar.gz rails-6741e70518b55c4bbd7a53346b5937319a31a15f.tar.bz2 rails-6741e70518b55c4bbd7a53346b5937319a31a15f.zip | |
Merge pull request #34411 from N0xFF/master
Reset Capybara sessions if failed system test screenshot raising an exception
Diffstat (limited to 'actionpack/lib/action_dispatch/system_testing')
| -rw-r--r-- | actionpack/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb b/actionpack/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb index e47d5020f4..600e9c733b 100644 --- a/actionpack/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb +++ b/actionpack/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb @@ -17,8 +17,11 @@ module ActionDispatch end def after_teardown - take_failed_screenshot - Capybara.reset_sessions! + begin + take_failed_screenshot + ensure + Capybara.reset_sessions! + end ensure super end |
