aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/system_testing/driver_adapter.rb
diff options
context:
space:
mode:
authoreileencodes <eileencodes@gmail.com>2016-09-11 17:00:26 -0400
committereileencodes <eileencodes@gmail.com>2017-02-20 15:07:32 -0500
commitb44320254167152383b1fa8792cb17847a51fb49 (patch)
treef9a7eede21e9feadfd62914f5118fa4feac7a297 /actionpack/lib/system_testing/driver_adapter.rb
parent9730b1dba6d1bb9684a54915ac3735d9c0eade26 (diff)
downloadrails-b44320254167152383b1fa8792cb17847a51fb49.tar.gz
rails-b44320254167152383b1fa8792cb17847a51fb49.tar.bz2
rails-b44320254167152383b1fa8792cb17847a51fb49.zip
Add documentation for system tests
* Document Rails::SystemTestCase * Document setting drivers with the configration options * Document using the getter/setter for driver adapters * Document the CapybaraRackTestDriver and defaults * Document the CapybaraSeleniumDriver and defaults * Document custom assertions provided by System Testing * Document custom form helpers provided by System Testing
Diffstat (limited to 'actionpack/lib/system_testing/driver_adapter.rb')
-rw-r--r--actionpack/lib/system_testing/driver_adapter.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/actionpack/lib/system_testing/driver_adapter.rb b/actionpack/lib/system_testing/driver_adapter.rb
index 47d37a26b7..cf44a4fd6b 100644
--- a/actionpack/lib/system_testing/driver_adapter.rb
+++ b/actionpack/lib/system_testing/driver_adapter.rb
@@ -1,18 +1,27 @@
require 'system_testing/driver_adapters'
module SystemTesting
+ # The <tt>SystemTesting::DriverAdapter</tt> module is used to load the driver
+ # set in your Rails' test configuration file.
+ #
+ # The default driver adapters is the +:capybara_rack_test_driver+.
module DriverAdapter
extend ActiveSupport::Concern
module ClassMethods
- def default_driver
+ def default_driver # :nodoc
:capybara_rack_test_driver
end
+ # Returns the current driver that is set. If no driver is set in the
+ # Rails' configuration file then +:capybara_rack_test_driver+ will be
+ # initialized.
def driver
@driver ||= DriverAdapters.lookup(default_driver).new
end
+ # Specify the adapter and settings for the system test driver set in the
+ # Rails' configuration file.
def driver=(adapter)
@driver = case adapter
when Symbol