diff options
author | Eileen M. Uchitelle <eileencodes@users.noreply.github.com> | 2019-04-22 08:28:57 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-22 08:28:57 -0400 |
commit | 2db5895a5e8880915dfab08bd02f60a8ff2ad223 (patch) | |
tree | 1c55501dd28861eb1ab3f18f4b59257796442f6a /actionpack/lib | |
parent | 89b86640901be4f423cef4059d970c0aa0adb648 (diff) | |
parent | ef12ccfd8bc42d88611dea1190988214836b951c (diff) | |
download | rails-2db5895a5e8880915dfab08bd02f60a8ff2ad223.tar.gz rails-2db5895a5e8880915dfab08bd02f60a8ff2ad223.tar.bz2 rails-2db5895a5e8880915dfab08bd02f60a8ff2ad223.zip |
Merge pull request #36047 from rmacklin/take-screenshot-sooner
Make system tests take failed screenshots in `before_teardown` hook
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb | 12 |
1 files changed, 7 insertions, 5 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 600e9c733b..7080dbe022 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 @@ -16,12 +16,14 @@ module ActionDispatch super end + def before_teardown + take_failed_screenshot + ensure + super + end + def after_teardown - begin - take_failed_screenshot - ensure - Capybara.reset_sessions! - end + Capybara.reset_sessions! ensure super end |