lib/capybara/screenshot/diff.rb in capybara-screenshot-diff-1.5.4 vs lib/capybara/screenshot/diff.rb in capybara-screenshot-diff-1.5.5
- old
+ new
@@ -78,10 +78,14 @@
if Capybara::Screenshot::Diff.enabled && @test_screenshots
test_screenshot_errors = @test_screenshots
.map { |caller, name, compare| assert_image_not_changed(caller, name, compare) }
@test_screenshots = nil # release the comparison objects from memory
test_screenshot_errors.compact!
- raise ASSERTION, test_screenshot_errors.join("\n\n") if test_screenshot_errors.any?
+ if test_screenshot_errors.any?
+ e = ASSERTION.new(test_screenshot_errors.join("\n\n"))
+ e.set_backtrace(caller)
+ failures << e
+ end
end
end
end
end
end