aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/system_testing/driver_adapters/capybara_rack_test_driver.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/system_testing/driver_adapters/capybara_rack_test_driver.rb')
-rw-r--r--actionpack/lib/system_testing/driver_adapters/capybara_rack_test_driver.rb23
1 files changed, 21 insertions, 2 deletions
diff --git a/actionpack/lib/system_testing/driver_adapters/capybara_rack_test_driver.rb b/actionpack/lib/system_testing/driver_adapters/capybara_rack_test_driver.rb
index 2890686e29..78abfa05ee 100644
--- a/actionpack/lib/system_testing/driver_adapters/capybara_rack_test_driver.rb
+++ b/actionpack/lib/system_testing/driver_adapters/capybara_rack_test_driver.rb
@@ -1,13 +1,32 @@
module SystemTesting
module DriverAdapters
+ # == CapybaraRackTestDriver for System Testing
+ #
+ # This is the default driver for Capybara. This driver does not support
+ # JavaScript because it doesn't open a browser when running the test suite.
+ #
+ # Although it does not support JavaScript testing the
+ # <tt>CapybaraRackTestDriver</tt> is fast and efficient. This driver requires
+ # no setup and becasue it does not need a webserver, additional configuration
+ # is not required.
+ #
+ # The <tt>CapybaraRackTestDriver</tt> only takes one argument for initialization
+ # which is +:useragent+.
+ #
+ # To set the useragent add the following to your
+ # Rails' configuration file:
+ #
+ # config.system_testing.driver = SystemTesting::DriverAdapters::CapybaraRackTestDriver.new(
+ # useragent: 'My UserAgent'
+ # )
class CapybaraRackTestDriver
attr_reader :useragent
- def initialize(useragent: 'Capybara')
+ def initialize(useragent: 'Capybara') # :nodoc:
@useragent = useragent
end
- def call
+ def call # :nodoc:
registration
end