system_test_case_test.rb 590 字节
Newer Older
E
eileencodes 已提交
1
require "abstract_unit"
E
eileencodes 已提交
2

3 4 5
class DrivenByCaseTestTest < ActiveSupport::TestCase
  test "selenium? returns false if driver is poltergeist" do
    assert_not ActionDispatch::SystemTestCase.selenium?(:poltergeist)
E
eileencodes 已提交
6
  end
7
end
E
eileencodes 已提交
8

9 10
class DrivenByRackTestTest < ActionDispatch::SystemTestCase
  driven_by :rack_test
E
eileencodes 已提交
11

12 13
  test "uses rack_test" do
    assert_equal :rack_test, Capybara.current_driver
E
eileencodes 已提交
14
  end
15
end
E
eileencodes 已提交
16

17 18 19 20 21
class DrivenBySeleniumWithChromeTest < ActionDispatch::SystemTestCase
  driven_by :selenium, using: :chrome

  test "uses selenium" do
    assert_equal :chrome, Capybara.current_driver
E
eileencodes 已提交
22 23
  end
end