aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/system_testing/driver_adapter_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/system_testing/driver_adapter_test.rb')
-rw-r--r--actionpack/test/system_testing/driver_adapter_test.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/actionpack/test/system_testing/driver_adapter_test.rb b/actionpack/test/system_testing/driver_adapter_test.rb
new file mode 100644
index 0000000000..bfbeaa63a2
--- /dev/null
+++ b/actionpack/test/system_testing/driver_adapter_test.rb
@@ -0,0 +1,19 @@
+require 'abstract_unit'
+
+class DriverAdapterTest < ActiveSupport::TestCase
+ test 'only registered adapters are accepted' do
+ assert_raises(NameError) do
+ Rails::SystemTestCase.driver = :whatever
+ end
+
+ assert_nothing_raised do
+ Rails::SystemTestCase.driver = :capybara_selenium_driver
+ end
+ end
+
+ test 'settings can only be used for the appropriate adapter' do
+ assert_raises(ArgumentError) do
+ Rails::SystemTestCase.driver = SystemTesting::DriverAdapters::CapybaraRackTestDriver.new(something: 'test')
+ end
+ end
+end