lib/capybara/screenshot/diff.rb in capybara-screenshot-diff-0.15.1 vs lib/capybara/screenshot/diff.rb in capybara-screenshot-diff-1.0.0
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
require 'capybara/dsl'
require 'capybara/screenshot/diff/version'
require 'capybara/screenshot/diff/image_compare'
require 'capybara/screenshot/diff/test_methods'
@@ -27,11 +29,11 @@
parts << os_name if Capybara::Screenshot.add_os_path
File.join parts
end
def screenshot_area_abs
- "#{root}/#{screenshot_area}".freeze
+ "#{root}/#{screenshot_area}"
end
end
# Module to track screen shot changes
module Diff
@@ -56,10 +58,10 @@
end
clas.teardown do
if Capybara::Screenshot::Diff.enabled && @test_screenshots
test_screenshot_errors = @test_screenshots
- .map { |caller, name, compare| assert_image_not_changed(caller, name, compare) }.compact
+ .map { |caller, name, compare| assert_image_not_changed(caller, name, compare) }.compact!
fail(test_screenshot_errors.join("\n\n")) if test_screenshot_errors.any?
end
end
end
end