1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #42675 from jonathanhefner/kwargs-capybara-racktest-driver-initialize

Fix "wrong number of arguments" error
This commit is contained in:
Ryuta Kamizono 2021-07-02 16:46:49 +09:00 committed by GitHub
commit c2069e9eb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,7 +45,7 @@ module ActionDispatch
end
def register_selenium(app)
Capybara::Selenium::Driver.new(app, **{ browser: @browser.type }.merge(browser_options)).tap do |driver|
Capybara::Selenium::Driver.new(app, browser: @browser.type, **browser_options).tap do |driver|
driver.browser.manage.window.size = Selenium::WebDriver::Dimension.new(*@screen_size)
end
end
@ -61,7 +61,7 @@ module ActionDispatch
end
def register_rack_test(app)
Capybara::RackTest::Driver.new(app, { respect_data_method: true }.merge(@options))
Capybara::RackTest::Driver.new(app, respect_data_method: true, **@options)
end
def setup