spec/models/user_spec.rb in clearance-1.2.0 vs spec/models/user_spec.rb in clearance-1.2.1

- old
+ new

@@ -16,11 +16,11 @@ it { should_not allow_value('foo').for(:email) } it { should_not allow_value('example.com').for(:email) } it { should_not allow_value('foo;@example.com').for(:email) } it 'stores email in down case and removes whitespace' do - user = create(:user, :email => 'Jo hn.Do e @exa mp le.c om') + user = create(:user, email: 'Jo hn.Do e @exa mp le.c om') user.email.should == 'john.doe@example.com' end end describe 'when multiple users have signed up' do @@ -82,14 +82,14 @@ end end end it 'does not generate same remember token for users with same password at same time' do - Time.stubs :now => Time.now + Time.stubs now: Time.now password = 'secret' - first_user = create(:user, :password => password) - second_user = create(:user, :password => password) + first_user = create(:user, password: password) + second_user = create(:user, password: password) second_user.remember_token.should_not == first_user.remember_token end describe 'a user' do before do @@ -156,10 +156,10 @@ it { should allow_value('').for(:email) } end describe 'user factory' do it 'should create a valid user with just an overridden password' do - build(:user, :password => 'test').should be_valid + build(:user, password: 'test').should be_valid end end describe 'email address normalization' do let(:email) { 'Jo hn.Do e @exa mp le.c om' }