README.rdoc in capybara-1.0.1 vs README.rdoc in capybara-1.1.0.rc1
- old
+ new
@@ -6,11 +6,11 @@
Capybara aims to simplify the process of integration testing Rack applications,
such as Rails, Sinatra or Merb. Capybara simulates how a real user would
interact with a web application. It is agnostic about the driver running your
tests and currently comes with Rack::Test and Selenium support built in.
-HtmlUnit and env.js are supported through external gems.
+HtmlUnit, WebKit and env.js are supported through external gems.
A complete reference is available at
{at rubydoc.info}[http://rubydoc.info/github/jnicklas/capybara/master].
== Install:
@@ -34,11 +34,11 @@
create a topic branch for every separate change you make.
Capybara uses bundler in development. To set up a development environment, simply do:
git submodule update --init
- gem install bundler --pre
+ gem install bundler
bundle install
== Using Capybara with Cucumber
Capybara is built to work nicely with Cucumber. Support for Capybara is built into
@@ -280,10 +280,25 @@
Ruby 1.8.7 at this time.
Note: Envjs does not support transactional fixtures; see the section
"Transactional Fixtures" below.
+=== Capybara-webkit
+
+The {capybara-webkit drive}[https://github.com/thoughtbot/capybara-webkit] is for true headless
+testing. It uses WebKitQt to start a rendering engine process. It can execute JavaScript as well.
+It is significantly faster than drivers like Selenium since it does not load an entire browser.
+
+You can install it with:
+
+ gem install capybara-webkit
+
+And you can use it by:
+
+ Capybara.javascript_driver = :webkit
+
+
== The DSL
Capybara's DSL (domain-specific language) is inspired by Webrat. While
backwards compatibility is retained in a lot of cases, there are certain
important differences. Unlike in Webrat, all searches in Capybara are *case
@@ -468,10 +483,10 @@
click_link('bar')
page.should have_content('baz')
If clicking on the *foo* link causes triggers an asynchronous process, such as
an Ajax request, which, when complete will add the *bar* link to the page,
-clicking on the *bar* link would be expeced to fail, since that link doesn't
+clicking on the *bar* link would be expected to fail, since that link doesn't
exist yet. However Capybara is smart enought to retry finding the link for a
brief period of time before giving up and throwing an error. The same is true of
the next line, which looks for the content *baz* on the page; it will retry
looking for that content for a brief time. You can adjust how long this period
is (the default is 2 seconds):