Sha256: 29554f6b8d8ca8f2f7541b3d8630ae288646bf88db9baadf1c1a678c7475928a
Contents?: true
Size: 879 Bytes
Versions: 15
Compression:
Stored size: 879 Bytes
Contents
FactoryGirl.define do factory :admin, :class => User do |f| f.sequence(:username){|n| "admin_#{n}"} f.sequence(:email){|n| "admin_#{n}@example.jp"} f.role {Role.find_by_name('Administrator')} f.password 'adminpassword' f.password_confirmation 'adminpassword' end factory :librarian, :class => User do |f| f.sequence(:username){|n| "librarian_#{n}"} f.sequence(:email){|n| "librarian_#{n}@example.jp"} f.role {Role.find_by_name('Librarian')} f.password 'librarianpassword' f.password_confirmation 'librarianpassword' end factory :user, :class => User do |f| f.sequence(:username){|n| "user_#{n}"} f.sequence(:email){|n| "user_#{n}@example.jp"} f.role {Role.find_by_name('User')} f.password 'userpassword' f.password_confirmation 'userpassword' end factory :invalid_user, :class => User do |f| end end
Version data entries
15 entries across 15 versions & 1 rubygems