Я пытаюсь построить завод по модели «счет», определенной с authlogic:Authlogic + Factory Девочка: Не удалось выполнить проверку: Пароль слишком короткий (минимум 4-х символов)
class Account < UuidEnabled
acts_as_authentic do |c|
c.validate_password_field = true
c.require_password_confirmation = true
c.ignore_blank_passwords = false
c.crypto_provider = Authlogic::CryptoProviders::Sha512
end
end
Это мой завод :
FactoryGirl.define do
factory :account do
sequence(:email) { |n| "account_#{n}@example.com"}
password = "1234"
password_confirmation { |a| a.password} # to make things work even if the password is changed
end
end
Мой тест завершается с
ActiveRecord::RecordInvalid: Validation failed: Password is too short (minimum is 4 characters), Password confirmation is too short (minimum is 4 characters)
Спасибо! Удаление '=' решена проблема – Nimo