lib/capybara/screenshot/diff.rb in capybara-screenshot-diff-1.0.1 vs lib/capybara/screenshot/diff.rb in capybara-screenshot-diff-1.0.2
- old
+ new
@@ -57,10 +57,11 @@
end
end
clas.teardown do
if Capybara::Screenshot::Diff.enabled && @test_screenshots
- test_screenshot_errors = @test_screenshots.map(&method(:assert_image_not_changed))
+ test_screenshot_errors = @test_screenshots
+ .map { |caller, name, compare| assert_image_not_changed(caller, name, compare) }
test_screenshot_errors.compact!
fail(test_screenshot_errors.join("\n\n")) if test_screenshot_errors.any?
end
end
end