mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Rubocop updates
This commit is contained in:
parent
3780800f33
commit
7efced6e73
3 changed files with 5 additions and 4 deletions
|
@ -194,6 +194,7 @@ module Capybara
|
|||
def ==(other)
|
||||
native == other.native
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def option_value(option)
|
||||
|
|
|
@ -14,7 +14,7 @@ Capybara.register_driver :selenium_headless do |app|
|
|||
browser_options = ::Selenium::WebDriver::Firefox::Options.new.tap do |opts|
|
||||
opts.add_argument '-headless'
|
||||
end
|
||||
Capybara::Selenium::Driver.new(app, **Hash[:browser => :firefox, options_key => browser_options])
|
||||
Capybara::Selenium::Driver.new(app, **{ :browser => :firefox, options_key => browser_options })
|
||||
end
|
||||
|
||||
Capybara.register_driver :selenium_chrome do |app|
|
||||
|
@ -25,7 +25,7 @@ Capybara.register_driver :selenium_chrome do |app|
|
|||
opts.add_argument('--disable-site-isolation-trials')
|
||||
end
|
||||
|
||||
Capybara::Selenium::Driver.new(app, **Hash[:browser => :chrome, options_key => browser_options])
|
||||
Capybara::Selenium::Driver.new(app, **{ :browser => :chrome, options_key => browser_options })
|
||||
end
|
||||
|
||||
Capybara.register_driver :selenium_chrome_headless do |app|
|
||||
|
@ -38,5 +38,5 @@ Capybara.register_driver :selenium_chrome_headless do |app|
|
|||
opts.add_argument('--disable-site-isolation-trials')
|
||||
end
|
||||
|
||||
Capybara::Selenium::Driver.new(app, **Hash[:browser => :chrome, options_key => browser_options])
|
||||
Capybara::Selenium::Driver.new(app, **{ :browser => :chrome, options_key => browser_options })
|
||||
end
|
||||
|
|
|
@ -69,7 +69,7 @@ module Capybara
|
|||
def valid_value?(value)
|
||||
return true unless @options.key?(:valid_values)
|
||||
|
||||
Array(@options[:valid_values]).any? { |valid| valid === value } # rubocop:disable Style/CaseEquality
|
||||
Array(@options[:valid_values]).any? { |valid| valid === value } # rubocop:disable Style/CaseEquality,Performance/RedundantEqualityComparisonBlock
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue