aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorEileen M. Uchitelle <eileencodes@users.noreply.github.com>2017-02-23 11:16:13 -0500
committerGitHub <noreply@github.com>2017-02-23 11:16:13 -0500
commit4734d23c74fb4193aafe7cb04256bb745680d97f (patch)
tree0f4f2009bce3b83666514d5cce0bd693057c4dc4 /actionpack/test
parent039380e3eeb24ed17f1824183b94638f0cfff747 (diff)
parentebaf1e709fb64cf7bbddb8f539863c2f24c3d3d5 (diff)
downloadrails-4734d23c74fb4193aafe7cb04256bb745680d97f.tar.gz
rails-4734d23c74fb4193aafe7cb04256bb745680d97f.tar.bz2
rails-4734d23c74fb4193aafe7cb04256bb745680d97f.zip
Merge pull request #28125 from y-yagi/do_not_take_screenshots_when_test_skipped
Do not take screenshot when test skipped
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/dispatch/system_testing/screenshot_helper_test.rb10
1 files changed, 10 insertions, 0 deletions
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