Updated setup instructions for cuke-rails 0.2

This commit is contained in:
Jonas Nicklas 2009-12-15 22:54:10 +01:00
parent cb809f996d
commit 6ce66edf6f
1 changed files with 6 additions and 9 deletions

View File

@ -26,18 +26,15 @@ Capybara is hosted on Gemcutter, install it with:
== Using Capybara with Cucumber == Using Capybara with Cucumber
Capybara is built to work nicely with Cucumber. The API is very similar to Capybara is built to work nicely with Cucumber. The API is very similar to
Webrat, so if you know Webrat you should feel right at home. Remove any Webrat, so if you know Webrat you should feel right at home. Support for
references to Webrat from your <tt>env.rb</tt>, if you're using Rails, make sure to set Capybara is built into cucumber-rails 0.2. In your Rails app, just run:
Cucumber::Rails::World.use_transactional_fixtures = false script/generate cucumber --capybara
Capybara uses DatabaseCleaner to truncate the database. Require Capybara in your And everything should be set up and ready to go.
env.rb. For Rails do this:
require 'capybara/rails' If you want to use Capybara with Cucumber outside Rails (for example with Merb
require 'capybara/cucumber' or Sinatra), you'll need require capybara and set the Rack app manually:
For other frameworks, you'll need to set the Rack app manually:
require 'capybara/cucumber' require 'capybara/cucumber'
Capybara.app = MyRackApp Capybara.app = MyRackApp