diff --git a/README.rdoc b/README.rdoc index e4140ff0..df94913b 100644 --- a/README.rdoc +++ b/README.rdoc @@ -106,21 +106,11 @@ You can now write your specs like so: end end -Capybara is only included in example groups tagged with -:type => :request (or :acceptance for compatibility with Steak). +If you are using Rails, put your Capybara specs in spec/requests or +spec/integration. -If you are testing a Rails app and using the rspec-rails gem, these -:request example groups may look familiar to you. That's because they -are RSpec versions of Rails integration tests. So, in this case essentially what you are getting are Capybara-enhanced request specs. This means that you can -use the Capybara helpers and you have access to things like named route -helpers in your tests (so you are able to say, for instance, visit -edit_user_path(user), instead of visit "/users/#{user.id}/edit", -if you prefer that sort of thing). A good place to put these specs is -spec/requests (or synonymously spec/integration), as -rspec-rails will automatically tag them with :type => -:request. - -rspec-rails will also automatically include Capybara in :controller and :mailer example groups. +If you are not using Rails, tag all the example groups in which you want to use +Capybara with :type => :request. RSpec's metadata feature can be used to switch to a different driver. Use :js => true to switch to the javascript driver, or provide a