lib/capybara/screenshot/diff.rb in capybara-screenshot-diff-1.8.1 vs lib/capybara/screenshot/diff.rb in capybara-screenshot-diff-1.8.2
- old
+ new
@@ -78,29 +78,29 @@
BrowserHelpers.resize_to(Screenshot.window_size) if Screenshot.window_size
end
klass.teardown do
if Screenshot.active? && @test_screenshots.present?
- track_failures(@test_screenshots, caller)
+ track_failures(@test_screenshots)
@test_screenshots.clear
end
end
end
private
EMPTY_LINE = "\n\n"
- def track_failures(screenshots, original_caller)
+ def track_failures(screenshots)
test_screenshot_errors = screenshots.map do |caller, name, compare|
- assert_image_not_changed(name, compare)
+ assert_image_not_changed(caller, name, compare)
end
test_screenshot_errors.compact!
unless test_screenshot_errors.empty?
error = ASSERTION.new(test_screenshot_errors.join(EMPTY_LINE))
- error.set_backtrace(original_caller)
+ error.set_backtrace([])
if is_a?(::Minitest::Runnable)
failures << error
else
raise error