rspec-rails: add feature tests
This commit is contained in:
parent
c1e836c08d
commit
d354fd7020
|
@ -40,6 +40,9 @@ describe MyController do
|
|||
expect(response).to be_success
|
||||
expect(response).to have_http_status(200)
|
||||
expect(response).to render_template("index")
|
||||
expect(response).to redirect_to '/..'
|
||||
|
||||
expect(assigns :article).to eq article
|
||||
|
||||
response.status
|
||||
end
|
||||
|
@ -109,6 +112,20 @@ describe EventsHelper do
|
|||
end
|
||||
```
|
||||
|
||||
### Features
|
||||
|
||||
```rb
|
||||
# spec/features/*.rb
|
||||
feature 'Signing in' do
|
||||
background do
|
||||
User.make email: 'hi@gmail.com'
|
||||
end
|
||||
|
||||
scenario 'Signing in with credentials' do
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
### Matchers
|
||||
|
||||
```rb
|
||||
|
|
Loading…
Reference in New Issue