aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/system_testing/screenshot_helper_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/dispatch/system_testing/screenshot_helper_test.rb')
-rw-r--r--actionpack/test/dispatch/system_testing/screenshot_helper_test.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/actionpack/test/dispatch/system_testing/screenshot_helper_test.rb b/actionpack/test/dispatch/system_testing/screenshot_helper_test.rb
index 3da89f4a10..8c14f799b0 100644
--- a/actionpack/test/dispatch/system_testing/screenshot_helper_test.rb
+++ b/actionpack/test/dispatch/system_testing/screenshot_helper_test.rb
@@ -5,6 +5,14 @@ class ScreenshotHelperTest < ActiveSupport::TestCase
test "image path is saved in tmp directory" do
new_test = ActionDispatch::SystemTestCase.new("x")
- assert_equal "tmp/screenshots/failures_x.png", new_test.send(:image_path)
+ assert_equal "tmp/screenshots/x.png", new_test.send(:image_path)
+ end
+
+ test "image path includes failures text if test did not pass" do
+ new_test = ActionDispatch::SystemTestCase.new("x")
+
+ new_test.stub :passed?, false do
+ assert_equal "tmp/screenshots/failures_x.png", new_test.send(:image_path)
+ end
end
end