Sha256: c57ff020fc9c852de15a2630d23852f33ca012548b5851947cb3a580e4c6e869
Contents?: true
Size: 1.23 KB
Versions: 4
Compression:
Stored size: 1.23 KB
Contents
FactoryGirl.define do factory :admin_user, :class => User do |user| user.name 'Admin' user.email { Factory.next(:email) } user.password 'password' user.password_confirmation 'password' user.after_build do |u| u.roles.build(:role_type => RoleType.admin) u.skip_confirmation! end end factory :redactor_user, :class => User do |user| user.name 'Redactor' user.email { Factory.next(:email) } user.password 'password' user.password_confirmation 'password' user.after_build do |u| u.roles.build(:role_type => RoleType.redactor) u.skip_confirmation! end end factory :default_user, :class => User do |user| user.name 'Test' user.email { Factory.next(:email) } user.password 'password' user.password_confirmation 'password' user.after_build do |u| u.roles.build(:role_type => RoleType.default) u.skip_confirmation! end end factory :user, :class => User do |user| user.name 'Test' user.email { Factory.next(:email) } user.password 'password' user.password_confirmation 'password' end sequence :email do |n| "testing#{n}@example.com" end end
Version data entries
4 entries across 4 versions & 3 rubygems