aboutsummaryrefslogtreecommitdiffstats
path: root/actionsystemtest/lib/action_system_test/driver_adapters
diff options
context:
space:
mode:
authoreileencodes <eileencodes@gmail.com>2016-11-12 17:58:07 -0500
committereileencodes <eileencodes@gmail.com>2017-02-20 15:07:33 -0500
commit4540cebf3ee6c0d2a7e64757460d05cff3bbffbf (patch)
tree98c1421b039d64b8e88c0dddb38d2b20b2a769f1 /actionsystemtest/lib/action_system_test/driver_adapters
parent84f82f0a84de0906d195b529a9f780141c43507a (diff)
downloadrails-4540cebf3ee6c0d2a7e64757460d05cff3bbffbf.tar.gz
rails-4540cebf3ee6c0d2a7e64757460d05cff3bbffbf.tar.bz2
rails-4540cebf3ee6c0d2a7e64757460d05cff3bbffbf.zip
Amend documentation
Many changes have been made since the beginning so documentation needed a refresher.
Diffstat (limited to 'actionsystemtest/lib/action_system_test/driver_adapters')
-rw-r--r--actionsystemtest/lib/action_system_test/driver_adapters/capybara_driver.rb22
-rw-r--r--actionsystemtest/lib/action_system_test/driver_adapters/rails_selenium_driver.rb33
2 files changed, 32 insertions, 23 deletions
diff --git a/actionsystemtest/lib/action_system_test/driver_adapters/capybara_driver.rb b/actionsystemtest/lib/action_system_test/driver_adapters/capybara_driver.rb
index 5362f6db25..c1b395f712 100644
--- a/actionsystemtest/lib/action_system_test/driver_adapters/capybara_driver.rb
+++ b/actionsystemtest/lib/action_system_test/driver_adapters/capybara_driver.rb
@@ -4,8 +4,7 @@ module ActionSystemTest
module DriverAdapters
# == CapybaraDriver for System Testing
#
- # The <tt>CapybaraDriver</tt> is a shim that sits between Rails and
- # Capybara.
+ # The <tt>CapybaraDriver</tt> is a shim between Rails and Capybara.
#
# The drivers Capybara supports are: +:rack_test+, +:selenium+, +:webkit+,
# and +:poltergeist+.
@@ -15,16 +14,21 @@ module ActionSystemTest
# directly.
#
# To set your system tests to use one of Capybara's default drivers, add
- # the following to yur Rails' configuration test environment:
+ # the following to your +system_test_helper+ class file:
#
- # config.system_testing.driver = :rack_test
+ # class ActionSystemTestCase < ActionSystemTest::Base
+ # ActionSystemTest.driver = :rack_test
+ # end
#
# The +:rack_test+ driver is a basic test driver that doesn't support
# JavaScript testing and doesn't require a server.
#
# The +:poltergeist+ and +:webkit+ drivers are headless, but require some
- # extra environment setup. Because the default server for Rails is Puma, each
- # of the Capybara drivers will default to using Puma. Changing the configuration
+ # extra environment setup. Please see their README's for instructions on
+ # environment setup.
+ #
+ # Because the default server for Rails is Puma, each of the Capybara
+ # drivers will default to using Puma. Changing the configuration
# to use Webrick is possible by initalizing a new driver object.
#
# The default settings for the <tt>CapybaraDriver</tt> are:
@@ -35,10 +39,10 @@ module ActionSystemTest
# @port=28100
# >
#
- # The settings for the <tt>CapybaraDriver</tt> can be changed from
- # Rails' configuration file.
+ # The settings for the <tt>CapybaraDriver</tt> can be changed in the
+ # +system_test_helper+ file in your application's test directory.
#
- # config.system_testing.driver = ActionSystemTest::DriverAdapters::CapybaraDriver.new(
+ # ActionSystemTest.driver = ActionSystemTest::DriverAdapters::CapybaraDriver.new(
# name: :webkit,
# server: :webrick
# )
diff --git a/actionsystemtest/lib/action_system_test/driver_adapters/rails_selenium_driver.rb b/actionsystemtest/lib/action_system_test/driver_adapters/rails_selenium_driver.rb
index 16e485398a..543b14a029 100644
--- a/actionsystemtest/lib/action_system_test/driver_adapters/rails_selenium_driver.rb
+++ b/actionsystemtest/lib/action_system_test/driver_adapters/rails_selenium_driver.rb
@@ -2,7 +2,7 @@ require "action_system_test/driver_adapters/web_server"
module ActionSystemTest
module DriverAdapters
- # == RailsSeleniumDriver for System Testing
+ # == RailsSeleniumDriver for Action System Test
#
# The <tt>RailsSeleniumDriver</tt> uses the Selenium 2.0 webdriver. The
# selenium-webdriver gem is required by this driver.
@@ -12,9 +12,11 @@ module ActionSystemTest
#
# By default Rails system testing will use Rails' configuration with Capybara
# and the Selenium driver. To explictly set the <tt>RailsSeleniumDriver</tt>
- # add the following to your Rails' configuration test environment:
+ # add the following to your +system_test_helper+:
#
- # config.system_testing.driver = :rails_selenium_driver
+ # class ActionSystemTest < ActionSystemTest::Base
+ # ActionSystemTest.driver = :rails_selenium_driver
+ # end
#
# Because this driver supports real browser testing it is required that a
# server is configured.
@@ -31,24 +33,27 @@ module ActionSystemTest
# >
#
# The settings for the <tt>RailsSeleniumDriver</tt> can be changed in the
- # Rails configuration file.
+ # +system_test_helper+.
#
- # config.system_testing.driver = ActionSystemTest::DriverAdapters::RailsSeleniumDriver.new(
- # server: :webrick,
- # port: 28100,
- # screen_size: [ 800, 800 ]
- # )
+ # class ActionSystemTest < ActionSystemTest::Base
+ # ActionSystemTest.driver = ActionSystemTest::DriverAdapters::RailsSeleniumDriver.new(
+ # server: :webrick,
+ # port: 28100,
+ # screen_size: [ 800, 800 ]
+ # )
+ # end
#
- # The default browser is set to Chrome because the current version of
- # Firefox does not work with selenium-webdriver. If you want to use Firefox,
+ # The default browser is set to Chrome. If you want to use Firefox,
# you will need to use Firefox 45.0esr or 47.0 and ensure
# that selenium-webdriver is version 2.53.4. To change the browser from
# +:chrome+ to +:firefox+, initialize the Selenium driver in your Rails'
# test environment:
#
- # config.system_testing.driver = ActionSystemTest::DriverAdapters::RailsSeleniumDriver.new(
- # browser: :firefox
- # )
+ # class ActionSystemTest < ActionSystemTest::Base
+ # ActionSystemTest.driver = ActionSystemTest::DriverAdapters::RailsSeleniumDriver.new(
+ # browser: :firefox
+ # )
+ # end
class RailsSeleniumDriver
include WebServer