mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
added documentation on driver switching with Test::Unit
This commit is contained in:
parent
112be586e3
commit
1b44e0ba0e
1 changed files with 6 additions and 2 deletions
|
@ -149,6 +149,10 @@ whatever test class you are using. For example, if your classes derive from
|
||||||
include Capybara::DSL
|
include Capybara::DSL
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Test::Unit does not support selecting the driver through test metadata, but you
|
||||||
|
can switch the driver for specific classes using the <tt>setup</tt> and
|
||||||
|
<tt>teardown</tt> methods. See the section "Selecting the Driver".
|
||||||
|
|
||||||
== Using Capybara with Ruby on Rails
|
== Using Capybara with Ruby on Rails
|
||||||
|
|
||||||
If you are using the Rails framework, add this line to automatically configure
|
If you are using the Rails framework, add this line to automatically configure
|
||||||
|
@ -183,8 +187,8 @@ tests that require a JavaScript-capable driver using <tt>:js => true</tt> or
|
||||||
<tt>:selenium</tt> driver. You can change this by setting
|
<tt>:selenium</tt> driver. You can change this by setting
|
||||||
<tt>Capybara.javascript_driver</tt>.
|
<tt>Capybara.javascript_driver</tt>.
|
||||||
|
|
||||||
You can also change the driver temporarily (typically in the Before and After
|
You can also change the driver temporarily (typically in the Before/setup and
|
||||||
blocks):
|
After/teardown blocks):
|
||||||
|
|
||||||
Capybara.current_driver = :culerity # temporarily select different driver
|
Capybara.current_driver = :culerity # temporarily select different driver
|
||||||
... tests ...
|
... tests ...
|
||||||
|
|
Loading…
Reference in a new issue