test/models/validatable_test.rb in devise-1.1.rc2 vs test/models/validatable_test.rb in devise-1.1.0

- old
+ new

@@ -1,10 +1,8 @@ require 'test_helper' class ValidatableTest < ActiveSupport::TestCase - extend Devise::TestSilencer if [:mongoid, :data_mapper].include?(DEVISE_ORM) - test 'should require email to be set' do user = new_user(:email => nil) assert user.invalid? assert user.errors[:email] assert_equal 'can\'t be blank', user.errors[:email].join @@ -13,14 +11,14 @@ test 'should require uniqueness of email, allowing blank' do existing_user = create_user user = new_user(:email => '') assert user.invalid? - assert_not_equal 'has already been taken', user.errors[:email].join + assert_no_match(/taken/, user.errors[:email].join) user.email = existing_user.email assert user.invalid? - assert_equal 'has already been taken', user.errors[:email].join + assert_match(/taken/, user.errors[:email].join) end test 'should require correct email format, allowing blank' do user = new_user(:email => '') assert user.invalid?