Sha256: 53bf211c0d8d3986a89573d6fc20a37f38fc205521aba4a79a5de39daaa51bc8

Contents?: true

Size: 419 Bytes

Versions: 6

Compression:

Stored size: 419 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 :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

6 entries across 6 versions & 1 rubygems

Version Path
rad_kit-0.0.6 spec/spec_helper/factories.rb
rad_kit-0.0.5 spec/spec_helper/factories.rb
rad_kit-0.0.4 spec/spec_helper/factories.rb
rad_kit-0.0.3 spec/spec_helper/factories.rb
rad_kit-0.0.2 spec/spec_helper/factories.rb
rad_kit-0.0.1 spec/spec_helper/factories.rb