Remove `should' usages in specs

This commit is contained in:
Thibault Jouan
2015-04-30 13:43:54 +00:00
parent 1a39db3909
commit d58c9ba0cb
4 changed files with 19 additions and 19 deletions

View File

@@ -1,17 +1,17 @@
describe User do
subject(:user) { FactoryGirl.build(:user) }
it { should be_valid }
it { should have_many :playlists }
it { should validate_presence_of :email }
it { should validate_presence_of :password }
it { should validate_presence_of :password_hash }
it { is_expected.to be_valid }
it { is_expected.to have_many :playlists }
it { is_expected.to validate_presence_of :email }
it { is_expected.to validate_presence_of :password }
it { is_expected.to validate_presence_of :password_hash }
context 'when a user with the same email address already exists' do
let(:old_user) { FactoryGirl.create(:user, email: 'unique@example.net') }
subject(:user) { FactoryGirl.build(:user, email: old_user.email) }
it { should_not be_valid }
it { is_expected.to_not be_valid }
it 'has an error on email attribute' do
user.valid?
@@ -22,7 +22,7 @@ describe User do
context 'when password_confirmation does not match password' do
before { user.password_confirmation = user.password + 'INVALID' }
it { should_not be_valid }
it { is_expected.to_not be_valid }
end
describe '#password=' do