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

@@ -30,20 +30,20 @@ describe User do
describe '#password=' do
it 'stores a bcrypt hash of the password in password_hash' do
BCrypt::Password.new(user.password_hash).should == user.password
expect(BCrypt::Password.new(user.password_hash)).to eq user.password
end
end
describe '#authenticate?' do
context 'with a valid password' do
it 'returns true' do
user.authenticate?(user.password).should be_true
expect(user.authenticate?(user.password)).to be true
end
end
context 'with an invalid password' do
it 'returns false' do
user.authenticate?(user.password + '_INVALID').should be_false
expect(user.authenticate?(user.password + '_INVALID')).to be false
end
end
end