Sha256: cba5c0377ebfcb09423779ddd380a0992d896a21cf3eab94dcd7c80118ee8220
Contents?: true
Size: 497 Bytes
Versions: 1
Compression:
Stored size: 497 Bytes
Contents
# Read about factories at https://github.com/thoughtbot/factory_girl FactoryGirl.define do factory :user do sequence(:username) { |n| "#{Faker::Internet.user_name}_#{n}" } fullname Faker::Name.name email { Faker::Internet.email } password '12345678' password_confirmation { password } factory :admin do after(:build) { |user| user.roles = ['admin'] } end factory :user_admin do after(:build) { |user| user.roles = ['user_admin'] } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
chaltron-0.1.0 | spec/factories/users.rb |