Remove `should' usages in specs
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user