lib/capybara/screenshot/diff/drivers.rb in capybara-screenshot-diff-1.8.3 vs lib/capybara/screenshot/diff/drivers.rb in capybara-screenshot-diff-1.9.0
- old
+ new
@@ -3,10 +3,10 @@
module Capybara
module Screenshot
module Diff
module Drivers
def self.for(driver_options = {})
- driver_option = driver_options.fetch(:driver, :chunky_png)
+ driver_option = driver_options.is_a?(Hash) ? driver_options.fetch(:driver, :chunky_png) : driver_options
return driver_option unless driver_option.is_a?(Symbol)
Utils.find_driver_class_for(driver_option).new
end
end