1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Rubocop updates

This commit is contained in:
Thomas Walpole 2021-03-14 14:59:48 -07:00
parent 3780800f33
commit 7efced6e73
3 changed files with 5 additions and 4 deletions

View file

@ -194,6 +194,7 @@ module Capybara
def ==(other)
native == other.native
end
private
def option_value(option)

View file

@ -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

View file

@ -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