aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdouard CHIN <edouard.chin@shopify.com>2018-04-04 13:29:50 -0400
committerEileen Uchitelle <eileencodes@gmail.com>2019-01-29 08:50:29 -0500
commit5936bd9a201a2c1a3730d9c857f0908959505d2b (patch)
treea32f4e8b1e7876f4a356eabb462cd718bed483b6
parent01a26e581f977b08de072ce3c40b9adee2ba1c10 (diff)
downloadrails-5936bd9a201a2c1a3730d9c857f0908959505d2b.tar.gz
rails-5936bd9a201a2c1a3730d9c857f0908959505d2b.tar.bz2
rails-5936bd9a201a2c1a3730d9c857f0908959505d2b.zip
driver_option -> driver_options
-rw-r--r--actionpack/CHANGELOG.md3
-rw-r--r--actionpack/lib/action_dispatch/system_testing/browser.rb8
-rw-r--r--actionpack/lib/action_dispatch/system_testing/driver.rb6
3 files changed, 9 insertions, 8 deletions
diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md
index 024e03ad7a..d9041aecb7 100644
--- a/actionpack/CHANGELOG.md
+++ b/actionpack/CHANGELOG.md
@@ -1,4 +1,5 @@
-* `ActionDispatch::SystemTestCase.driven_by` can now be called with a block to define specific browser capabilities.
+* `ActionDispatch::SystemTestCase.driven_by` can now be called with a block
+ to define specific browser capabilities.
*Edouard Chin*
diff --git a/actionpack/lib/action_dispatch/system_testing/browser.rb b/actionpack/lib/action_dispatch/system_testing/browser.rb
index 9361b165ff..74585062aa 100644
--- a/actionpack/lib/action_dispatch/system_testing/browser.rb
+++ b/actionpack/lib/action_dispatch/system_testing/browser.rb
@@ -29,7 +29,7 @@ module ActionDispatch
end
end
- def driver_option
+ def driver_options
@option ||= case type
when :chrome
Selenium::WebDriver::Chrome::Options.new
@@ -43,13 +43,13 @@ module ActionDispatch
driver_option.args << "--headless"
driver_option.args << "--disable-gpu" if Gem.win_platform?
- driver_option
+ driver_options
end
def headless_firefox_browser_options
- driver_option.args << "-headless"
+ driver_options.args << "-headless"
- driver_option
+ driver_options
end
end
end
diff --git a/actionpack/lib/action_dispatch/system_testing/driver.rb b/actionpack/lib/action_dispatch/system_testing/driver.rb
index 87b72a2048..f71736833c 100644
--- a/actionpack/lib/action_dispatch/system_testing/driver.rb
+++ b/actionpack/lib/action_dispatch/system_testing/driver.rb
@@ -23,7 +23,7 @@ module ActionDispatch
end
def register
- define_browser_capabilities(@browser.driver_option)
+ define_browser_capabilities(@browser.driver_options)
Capybara.register_driver @name do |app|
case @name
@@ -34,8 +34,8 @@ module ActionDispatch
end
end
- def define_browser_capabilities(driver_option)
- @desired_capabilities.call(driver_option) if @desired_capabilities
+ def define_browser_capabilities(driver_options)
+ @desired_capabilities.call(driver_options) if @desired_capabilities
end
def browser_options