diff options
author | Eileen M. Uchitelle <eileencodes@users.noreply.github.com> | 2017-02-20 16:35:49 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-20 16:35:49 -0500 |
commit | 2ee146af6ba9193862b76306685eccee79fefef9 (patch) | |
tree | d5e20c06d020731e56ccac566e73b72130a85119 /actionpack/test/dispatch/system_testing/system_test_case_test.rb | |
parent | ff326e745614593530ee64b67ac21bf14e3d41b3 (diff) | |
parent | 42a6dbdf8480b96c4a0ac6e1dab215ae9dd77d1d (diff) | |
download | rails-2ee146af6ba9193862b76306685eccee79fefef9.tar.gz rails-2ee146af6ba9193862b76306685eccee79fefef9.tar.bz2 rails-2ee146af6ba9193862b76306685eccee79fefef9.zip |
Merge pull request #26703 from eileencodes/rails_system_tests
WIP: Capybara Integration with Rails (AKA System Tests)
Diffstat (limited to 'actionpack/test/dispatch/system_testing/system_test_case_test.rb')
-rw-r--r-- | actionpack/test/dispatch/system_testing/system_test_case_test.rb | 21 |
1 files changed, 21 insertions, 0 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 new file mode 100644 index 0000000000..a384902a14 --- /dev/null +++ b/actionpack/test/dispatch/system_testing/system_test_case_test.rb @@ -0,0 +1,21 @@ +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 + end + + test "driven_by sets Capybara's drivers respectively" do + ActionDispatch::SystemTestCase.driven_by :selenium, using: :chrome + + assert_includes Capybara.drivers, :selenium + assert_includes Capybara.drivers, :chrome + assert_equal :chrome, Capybara.default_driver + end + + test "selenium? returns false if driver is poltergeist" do + assert_not ActionDispatch::SystemTestCase.selenium?(:poltergeist) + end +end |