aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/dispatch/system_testing/system_test_case_test.rb26
1 files changed, 14 insertions, 12 deletions
diff --git a/actionpack/test/dispatch/system_testing/system_test_case_test.rb b/actionpack/test/dispatch/system_testing/system_test_case_test.rb
index a384902a14..ff01d6739a 100644
--- a/actionpack/test/dispatch/system_testing/system_test_case_test.rb
+++ b/actionpack/test/dispatch/system_testing/system_test_case_test.rb
@@ -1,21 +1,23 @@
require "abstract_unit"
-class SystemTestCaseTest < ActiveSupport::TestCase
- test "driven_by sets Capybara's default driver to poltergeist" do
- ActionDispatch::SystemTestCase.driven_by :poltergeist
-
- assert_equal :poltergeist, Capybara.default_driver
+class DrivenByCaseTestTest < ActiveSupport::TestCase
+ test "selenium? returns false if driver is poltergeist" do
+ assert_not ActionDispatch::SystemTestCase.selenium?(:poltergeist)
end
+end
- test "driven_by sets Capybara's drivers respectively" do
- ActionDispatch::SystemTestCase.driven_by :selenium, using: :chrome
+class DrivenByRackTestTest < ActionDispatch::SystemTestCase
+ driven_by :rack_test
- assert_includes Capybara.drivers, :selenium
- assert_includes Capybara.drivers, :chrome
- assert_equal :chrome, Capybara.default_driver
+ test "uses rack_test" do
+ assert_equal :rack_test, Capybara.current_driver
end
+end
- test "selenium? returns false if driver is poltergeist" do
- assert_not ActionDispatch::SystemTestCase.selenium?(:poltergeist)
+class DrivenBySeleniumWithChromeTest < ActionDispatch::SystemTestCase
+ driven_by :selenium, using: :chrome
+
+ test "uses selenium" do
+ assert_equal :chrome, Capybara.current_driver
end
end