aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2019-01-30 16:21:10 +0900
committerRyuta Kamizono <kamipo@gmail.com>2019-01-30 16:21:10 +0900
commitdeac9ec430f652ddea485c92f39f7b00ebb4d4a5 (patch)
treeb58b65b9b853b244738985aba65ea900e84f13b9 /actionpack/lib/action_dispatch
parentbf42e1506be85c0c977038ae334548f5699f7afd (diff)
downloadrails-deac9ec430f652ddea485c92f39f7b00ebb4d4a5.tar.gz
rails-deac9ec430f652ddea485c92f39f7b00ebb4d4a5.tar.bz2
rails-deac9ec430f652ddea485c92f39f7b00ebb4d4a5.zip
Fix system testing failure
https://travis-ci.org/rails/rails/jobs/486155626#L1317-L1335
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r--actionpack/lib/action_dispatch/system_testing/browser.rb19
1 files changed, 11 insertions, 8 deletions
diff --git a/actionpack/lib/action_dispatch/system_testing/browser.rb b/actionpack/lib/action_dispatch/system_testing/browser.rb
index f691bd5fe5..2ffb5f67f6 100644
--- a/actionpack/lib/action_dispatch/system_testing/browser.rb
+++ b/actionpack/lib/action_dispatch/system_testing/browser.rb
@@ -1,5 +1,7 @@
# frozen_string_literal: true
+require "selenium/webdriver"
+
module ActionDispatch
module SystemTesting
class Browser # :nodoc:
@@ -30,18 +32,19 @@ module ActionDispatch
end
def capabilities
- @option ||= case type
- when :chrome
- Selenium::WebDriver::Chrome::Options.new
- when :firefox
- Selenium::WebDriver::Firefox::Options.new
- end
+ @option ||=
+ case type
+ when :chrome
+ Selenium::WebDriver::Chrome::Options.new
+ when :firefox
+ Selenium::WebDriver::Firefox::Options.new
+ end
end
private
def headless_chrome_browser_options
- capability.args << "--headless"
- capability.args << "--disable-gpu" if Gem.win_platform?
+ capabilities.args << "--headless"
+ capabilities.args << "--disable-gpu" if Gem.win_platform?
capabilities
end