diff options
author | eileencodes <eileencodes@gmail.com> | 2016-11-12 17:58:07 -0500 |
---|---|---|
committer | eileencodes <eileencodes@gmail.com> | 2017-02-20 15:07:33 -0500 |
commit | 4540cebf3ee6c0d2a7e64757460d05cff3bbffbf (patch) | |
tree | 98c1421b039d64b8e88c0dddb38d2b20b2a769f1 /actionsystemtest/lib/action_system_test/test_helpers | |
parent | 84f82f0a84de0906d195b529a9f780141c43507a (diff) | |
download | rails-4540cebf3ee6c0d2a7e64757460d05cff3bbffbf.tar.gz rails-4540cebf3ee6c0d2a7e64757460d05cff3bbffbf.tar.bz2 rails-4540cebf3ee6c0d2a7e64757460d05cff3bbffbf.zip |
Amend documentation
Many changes have been made since the beginning so documentation needed
a refresher.
Diffstat (limited to 'actionsystemtest/lib/action_system_test/test_helpers')
-rw-r--r-- | actionsystemtest/lib/action_system_test/test_helpers/screenshot_helper.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/actionsystemtest/lib/action_system_test/test_helpers/screenshot_helper.rb b/actionsystemtest/lib/action_system_test/test_helpers/screenshot_helper.rb index 3264ddc86e..1b198b9b29 100644 --- a/actionsystemtest/lib/action_system_test/test_helpers/screenshot_helper.rb +++ b/actionsystemtest/lib/action_system_test/test_helpers/screenshot_helper.rb @@ -2,14 +2,13 @@ module ActionSystemTest module TestHelpers # Screenshot helper for system testing module ScreenshotHelper - # Takes a screenshot of the current page in the browser if the system - # test driver supports screenshots and the test failed. + # Takes a screenshot of the current page in the browser. # - # Additionally +take_screenshot+ can be used within your tests at points + # +take_screenshot+ can be used within your tests at points # you want to take a screenshot if the driver supports screenshots. The # Rack Test driver does not support screenshots. # - # You can check of the driver supports screenshots by running + # You can check if the driver supports screenshots by running # # ActionSystemTest.driver.supports_screenshots? # => true @@ -18,6 +17,8 @@ module ActionSystemTest puts find_image end + # Takes a screenshot only if the test failed. This is included + # by default in +teardown+ of system test. def take_failed_screenshot take_screenshot unless passed? end |