diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2018-02-27 14:20:42 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-27 14:20:42 -0500 |
commit | 39d2cde65919729ec1ca3663d7872adf8036fd58 (patch) | |
tree | 34c097baa6266a7e3a3f19e51caf47a8e7dd0e97 /actionpack/test | |
parent | 6bd33d66dde015a55912af20b469788ba20ddb4e (diff) | |
parent | fc7781646ce1d451ecee82d6ac0c38399c58704c (diff) | |
download | rails-39d2cde65919729ec1ca3663d7872adf8036fd58.tar.gz rails-39d2cde65919729ec1ca3663d7872adf8036fd58.tar.bz2 rails-39d2cde65919729ec1ca3663d7872adf8036fd58.zip |
Merge pull request #32127 from zamith/zamith/screenshot-absolute-path
Uses the absolute path for system test screenshots
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/dispatch/system_testing/screenshot_helper_test.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/actionpack/test/dispatch/system_testing/screenshot_helper_test.rb b/actionpack/test/dispatch/system_testing/screenshot_helper_test.rb index 264844fc7d..de79c05657 100644 --- a/actionpack/test/dispatch/system_testing/screenshot_helper_test.rb +++ b/actionpack/test/dispatch/system_testing/screenshot_helper_test.rb @@ -9,7 +9,7 @@ class ScreenshotHelperTest < ActiveSupport::TestCase new_test = DrivenBySeleniumWithChrome.new("x") Rails.stub :root, Pathname.getwd do - assert_equal "tmp/screenshots/x.png", new_test.send(:image_path) + assert_equal Rails.root.join("tmp/screenshots/x.png").to_s, new_test.send(:image_path) end end @@ -18,7 +18,7 @@ class ScreenshotHelperTest < ActiveSupport::TestCase Rails.stub :root, Pathname.getwd do new_test.stub :passed?, false do - assert_equal "tmp/screenshots/failures_x.png", new_test.send(:image_path) + assert_equal Rails.root.join("tmp/screenshots/failures_x.png").to_s, new_test.send(:image_path) end end end @@ -29,7 +29,7 @@ class ScreenshotHelperTest < ActiveSupport::TestCase Rails.stub :root, Pathname.getwd do new_test.stub :passed?, false do new_test.stub :skipped?, true do - assert_equal "tmp/screenshots/x.png", new_test.send(:image_path) + assert_equal Rails.root.join("tmp/screenshots/x.png").to_s, new_test.send(:image_path) end end end @@ -59,11 +59,11 @@ class ScreenshotHelperTest < ActiveSupport::TestCase end end - test "image path returns the relative path from current directory" do + test "image path returns the absolute path from root" do new_test = DrivenBySeleniumWithChrome.new("x") Rails.stub :root, Pathname.getwd.join("..") do - assert_equal "../tmp/screenshots/x.png", new_test.send(:image_path) + assert_equal Rails.root.join("tmp/screenshots/x.png").to_s, new_test.send(:image_path) end end end |