lib/capybara/screenshot/diff.rb in capybara-screenshot-diff-1.6.1 vs lib/capybara/screenshot/diff.rb in capybara-screenshot-diff-1.6.2
- old
+ new
@@ -94,10 +94,14 @@
@test_screenshots = nil # release the comparison objects from memory
test_screenshot_errors.compact!
if test_screenshot_errors.any?
e = ASSERTION.new(test_screenshot_errors.join("\n\n"))
e.set_backtrace(caller)
- failures << e
+ if defined?(failures)
+ failures << e
+ else
+ raise e
+ end
end
end
end
end
end