diff options
author | eileencodes <eileencodes@gmail.com> | 2016-08-27 16:48:24 -0400 |
---|---|---|
committer | eileencodes <eileencodes@gmail.com> | 2017-02-20 15:07:32 -0500 |
commit | 9730b1dba6d1bb9684a54915ac3735d9c0eade26 (patch) | |
tree | c2e74e65c3b333254a512338b04d8ef5fdcfe6bc /actionpack/test/system_testing/driver_adapter_test.rb | |
parent | 4533bb7dcbdd6e0451395bc869d6c3603c6ff1df (diff) | |
download | rails-9730b1dba6d1bb9684a54915ac3735d9c0eade26.tar.gz rails-9730b1dba6d1bb9684a54915ac3735d9c0eade26.tar.bz2 rails-9730b1dba6d1bb9684a54915ac3735d9c0eade26.zip |
Add tests for system testing
* Adds test case test
* Adds driver adapter test
* Adds tests for capybara seleium driver (testing the settings not
actually opening the browser to test capybara w/ selenium because that
would so so so slow)
* Adds tests for rack test driver
* Adds tests for generators
Diffstat (limited to 'actionpack/test/system_testing/driver_adapter_test.rb')
-rw-r--r-- | actionpack/test/system_testing/driver_adapter_test.rb | 19 |
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 |