lib/capybara/screenshot/diff/test_methods.rb in capybara-screenshot-diff-0.14.1 vs lib/capybara/screenshot/diff/test_methods.rb in capybara-screenshot-diff-0.14.2

- old
+ new

@@ -63,10 +63,11 @@ return unless Screenshot.active? && name.present? FileUtils.rm_rf screenshot_dir end + # @return [Boolean] wether a screenshot was taken def screenshot(name, color_distance_limit: Diff.color_distance_limit, shift_distance_limit: Diff.shift_distance_limit, area_size_limit: Diff.area_size_limit) return unless Screenshot.active? return if window_size_is_wrong? @@ -86,9 +87,10 @@ shift_distance_limit: shift_distance_limit, area_size_limit: area_size_limit) return unless comparison.old_file_exists? (@test_screenshots ||= []) << [caller(1..1).first, name, comparison] + true end def window_size_is_wrong? selenium? && Screenshot.window_size &&