Skip to content

Commit

Permalink
Updates RSpec docs for :type => :feature
Browse files Browse the repository at this point in the history
  • Loading branch information
alindeman committed Nov 14, 2012
1 parent d153635 commit bb93a5b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit bb93a5b

Please sign in to comment.