lib/capybara/screenshot/diff/drivers/vips_driver.rb in capybara-screenshot-diff-1.5.5 vs lib/capybara/screenshot/diff/drivers/vips_driver.rb in capybara-screenshot-diff-1.6.0
- old
+ new
@@ -16,12 +16,14 @@
# range considering color values and difference area size.
module Drivers
class VipsDriver
attr_reader :new_file_name, :old_file_name, :options
- def initialize(new_file_name, old_file_name = nil, **options)
+ def initialize(new_file_name, old_file_name = nil, options = {})
+ options = old_file_name if old_file_name.is_a?(Hash)
+
@new_file_name = new_file_name
- @old_file_name = old_file_name || "#{new_file_name}~"
+ @old_file_name = old_file_name || "#{new_file_name}#{ImageCompare::TMP_FILE_SUFFIX}"
@options = options || {}
reset
end