Update specs to new rspec syntax

This commit is contained in:
Thibault Jouan
2014-04-01 18:15:44 +00:00
parent 99d106cf36
commit 4cef7aeab9
32 changed files with 173 additions and 179 deletions

View File

@@ -13,17 +13,17 @@ feature 'API sign in' do
scenario 'signs the user in with valid credentials' do
do_create
response.should be_success
(JSON response.body).should include 'id'
expect(response).to be_success
expect(JSON response.body).to include 'id'
end
[:email, :password].each do |attr|
scenario "rejects authentication with invalid credentials (#{attr})" do
user.stub(attr => user.send(attr) + '_INVALID')
allow(user).to receive(attr).and_return(user.send(attr) + '_INVALID')
do_create
response.should be_not_found
response.body.should be_empty
expect(response).to be_not_found
expect(response.body).to be_empty
end
end
end