aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/dispatch/system_testing/browser_test.rb10
-rw-r--r--actionpack/test/dispatch/system_testing/driver_test.rb11
-rw-r--r--actionpack/test/dispatch/system_testing/system_test_case_test.rb6
3 files changed, 11 insertions, 16 deletions
diff --git a/actionpack/test/dispatch/system_testing/browser_test.rb b/actionpack/test/dispatch/system_testing/browser_test.rb
deleted file mode 100644
index b0ad309492..0000000000
--- a/actionpack/test/dispatch/system_testing/browser_test.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require "abstract_unit"
-require "action_dispatch/system_testing/browser"
-
-class BrowserTest < ActiveSupport::TestCase
- test "initializing the browser" do
- browser = ActionDispatch::SystemTesting::Browser.new(:chrome, [ 1400, 1400 ])
- assert_equal :chrome, browser.instance_variable_get(:@name)
- assert_equal [ 1400, 1400 ], browser.instance_variable_get(:@screen_size)
- end
-end
diff --git a/actionpack/test/dispatch/system_testing/driver_test.rb b/actionpack/test/dispatch/system_testing/driver_test.rb
index f0ebdb38db..96d598a7a3 100644
--- a/actionpack/test/dispatch/system_testing/driver_test.rb
+++ b/actionpack/test/dispatch/system_testing/driver_test.rb
@@ -6,4 +6,15 @@ class DriverTest < ActiveSupport::TestCase
driver = ActionDispatch::SystemTesting::Driver.new(:selenium)
assert_equal :selenium, driver.instance_variable_get(:@name)
end
+
+ test "initializing the driver with a browser" do
+ driver = ActionDispatch::SystemTesting::Driver.new(:selenium, using: :chrome, screen_size: [ 1400, 1400 ])
+ assert_equal :selenium, driver.instance_variable_get(:@name)
+ assert_equal :chrome, driver.instance_variable_get(:@using)
+ assert_equal [ 1400, 1400 ], driver.instance_variable_get(:@screen_size)
+ end
+
+ test "selenium? returns false if driver is poltergeist" do
+ assert_not ActionDispatch::SystemTesting::Driver.new(:poltergeist).send(:selenium?)
+ end
end
diff --git a/actionpack/test/dispatch/system_testing/system_test_case_test.rb b/actionpack/test/dispatch/system_testing/system_test_case_test.rb
index ff01d6739a..c9003e3841 100644
--- a/actionpack/test/dispatch/system_testing/system_test_case_test.rb
+++ b/actionpack/test/dispatch/system_testing/system_test_case_test.rb
@@ -1,11 +1,5 @@
require "abstract_unit"
-class DrivenByCaseTestTest < ActiveSupport::TestCase
- test "selenium? returns false if driver is poltergeist" do
- assert_not ActionDispatch::SystemTestCase.selenium?(:poltergeist)
- end
-end
-
class DrivenByRackTestTest < ActionDispatch::SystemTestCase
driven_by :rack_test