aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/system_testing/driver_adapter_test.rb
blob: bfbeaa63a2d6ac30fab0149d0ff3f55ddbbf902e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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