diff --git a/README.rdoc b/README.rdoc index 93d7d4cb..505f614f 100644 --- a/README.rdoc +++ b/README.rdoc @@ -194,6 +194,9 @@ Ajax requests to finish after you've interacted with the page. You can switch off this behaviour by setting the driver option :resynchronize to false. See the section on configuring drivers. +Note: Selenium does not support transactional fixtures; see the section +"Transactional Fixtures" below. + === HtmlUnit There are three different drivers, maintained as external gems, that you can @@ -210,6 +213,9 @@ use to drive {HtmlUnit}[http://htmlunit.sourceforge.net/]: as noted above, and make sure that JRuby is in your path. Note that Culerity does not seem to be working under Ruby 1.9 at the moment. +Note: HtmlUnit does not support transactional fixtures; see the section +"Transactional Fixtures" below. + === env.js The {capybara-envjs driver}[http://github.com/smparkes/capybara-envjs] @@ -222,6 +228,9 @@ JavaScript outside the browser. The driver is installed by installing the capyba More info about the driver and env.js are available through the links above. The envjs gem only supports Ruby 1.8.7 at this time. +Note: Envjs does not support transactional fixtures; see the section +"Transactional Fixtures" below. + == The DSL Capybara's DSL (domain-specific language) is inspired by Webrat. While @@ -381,6 +390,17 @@ look at it: save_and_open_page +== Transactional fixtures + +Transactional fixtures only work in the default Rack::Test driver, but not for +other drivers like Selenium. Cucumber takes care of this automatically, but +with Test::Unit or RSpec, you may have to use the +{database_cleaner}[https://github.com/bmabey/database_cleaner] gem. See {this +explanation}[https://groups.google.com/d/msg/ruby-capybara/JI6JrirL9gM/R6YiXj4gi_UJ] +(and code for {solution +2}[http://opinionated-programmer.com/2011/02/capybara-and-selenium-with-rspec-and-rails-3/#comment-220] +and {solution 3}[http://pastie.org/1745020]) for details. + == Asynchronous JavaScript (Ajax and friends) When working with asynchronous JavaScript, you might come across situations