14 lines
339 B
Ruby
14 lines
339 B
Ruby
Factory.sequence :email do |n|
|
|
"user#{n}@example.com"
|
|
end
|
|
|
|
Factory.define :user do |user|
|
|
user.email { Factory.next :email }
|
|
user.password { "password" }
|
|
user.password_confirmation { "password" }
|
|
end
|
|
|
|
Factory.define :email_confirmed_user, :parent => :user do |user|
|
|
user.email_confirmed { true }
|
|
end
|