From ebaf1e709fb64cf7bbddb8f539863c2f24c3d3d5 Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Thu, 23 Feb 2017 22:30:01 +0900 Subject: Do not take screenshot when test skipped --- .../test/dispatch/system_testing/screenshot_helper_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'actionpack/test/dispatch') diff --git a/actionpack/test/dispatch/system_testing/screenshot_helper_test.rb b/actionpack/test/dispatch/system_testing/screenshot_helper_test.rb index 8c14f799b0..3b4ea96c4f 100644 --- a/actionpack/test/dispatch/system_testing/screenshot_helper_test.rb +++ b/actionpack/test/dispatch/system_testing/screenshot_helper_test.rb @@ -15,4 +15,14 @@ class ScreenshotHelperTest < ActiveSupport::TestCase assert_equal "tmp/screenshots/failures_x.png", new_test.send(:image_path) end end + + test "image path does not include failures text if test skipped" do + new_test = ActionDispatch::SystemTestCase.new("x") + + new_test.stub :passed?, false do + new_test.stub :skipped?, true do + assert_equal "tmp/screenshots/x.png", new_test.send(:image_path) + end + end + end end -- cgit v1.2.3