Sha256: 4cbb62b9666b44a3bee3fc3c59ffce7b19cdc196669d08eabf06df364c56a891
Contents?: true
Size: 485 Bytes
Versions: 2
Compression:
Stored size: 485 Bytes
Contents
require 'factory_girl' # # User # Factory.define :anonymous, class: 'Models::User' do |u| u.name 'anonymous' end Factory.define :user, class: 'Models::User' do |u| u.sequence(:name){|i| "user#{i}"} end Factory.define :registered, parent: :user do |u| u.name 'alex' end Factory.define :admin, parent: :user do |u| u.admin true end Factory.define :member, parent: :user do |u| u.roles %w(member) end Factory.define :manager, parent: :user do |u| u.roles %w(manager) end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rad_kit-0.0.10 | spec/spec_helper/factories.rb |
rad_kit-0.0.9 | spec/spec_helper/factories.rb |