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