mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Updates RSpec docs for :type => :feature
This commit is contained in:
parent
d153635e65
commit
bb93a5b48f
1 changed files with 4 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue