diff options
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/system_testing/driver.rb | 6 | ||||
-rw-r--r-- | actionpack/test/dispatch/system_testing/driver_test.rb | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/actionpack/lib/action_dispatch/system_testing/driver.rb b/actionpack/lib/action_dispatch/system_testing/driver.rb index 1a027f2e23..81e6f0fc80 100644 --- a/actionpack/lib/action_dispatch/system_testing/driver.rb +++ b/actionpack/lib/action_dispatch/system_testing/driver.rb @@ -9,14 +9,14 @@ module ActionDispatch end def use - register unless rack_test? + register if registerable? setup end private - def rack_test? - @name == :rack_test + def registerable? + [:selenium, :poltergeist, :webkit].include?(@name) end def register diff --git a/actionpack/test/dispatch/system_testing/driver_test.rb b/actionpack/test/dispatch/system_testing/driver_test.rb index 4a1b971da5..34d27671bb 100644 --- a/actionpack/test/dispatch/system_testing/driver_test.rb +++ b/actionpack/test/dispatch/system_testing/driver_test.rb @@ -29,7 +29,7 @@ class DriverTest < ActiveSupport::TestCase assert_equal ({ skip_image_loading: true }), driver.instance_variable_get(:@options) end - test "rack_test? returns false if driver is poltergeist" do - assert_not ActionDispatch::SystemTesting::Driver.new(:poltergeist).send(:rack_test?) + test "registerable? returns false if driver is rack_test" do + assert_not ActionDispatch::SystemTesting::Driver.new(:rack_test).send(:registerable?) end end |