Sha256: e63cc0a4f2746fac3a4149fb40ac69f194bfd0fc47b9bf6e051f16feb4fcea0c
Contents?: true
Size: 555 Bytes
Versions: 10
Compression:
Stored size: 555 Bytes
Contents
FactoryGirl.define do factory :user do sequence(:email) { |i| "user#{i}@example.com" } password "password" sequence(:storytime_name) { |i| "user name #{i}" } factory :writer do before(:create){|user| user.storytime_role = Storytime::Role.find_by(name: "writer") } end factory :editor do before(:create){|user| user.storytime_role = Storytime::Role.find_by(name: "editor") } end factory :admin do before(:create){|user| user.storytime_role = Storytime::Role.find_by(name: "admin") } end end end
Version data entries
10 entries across 10 versions & 1 rubygems