From bb93a5b48f25f9d84bcf0562ca462fa74ce82191 Mon Sep 17 00:00:00 2001 From: Andy Lindeman Date: Wed, 14 Nov 2012 10:12:53 -0500 Subject: [PATCH] Updates RSpec docs for :type => :feature --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1d95248b..02c47d9f 100644 --- a/README.md +++ b/README.md @@ -79,16 +79,15 @@ Load RSpec 2.x support by adding the following line (typically to your require 'capybara/rspec' ``` -If you are using Rails, put your Capybara specs in `spec/requests` or -`spec/integration`. +If you are using Rails, put your Capybara specs in `spec/features`. If you are not using Rails, tag all the example groups in which you want to use -Capybara with `:type => :request`. +Capybara with `:type => :feature`. You can now write your specs like so: ```ruby -describe "the signup process", :type => :request do +describe "the signup process", :type => :feature do before :each do User.make(:email => 'user@example.com', :password => 'caplin') end @@ -132,7 +131,7 @@ feature "Signing up" do end ``` -`feature` is in fact just an alias for `describe ..., :type => :request`, +`feature` is in fact just an alias for `describe ..., :type => :feature`, `background` is an alias for `before`, and `scenario` for `it`. ## Using Capybara with Test::Unit