Sha256: 1b21ee29e9589370085d205c49d4404f2165831c246cc9494295404b557a7e04
Contents?: true
Size: 1.48 KB
Versions: 40
Compression:
Stored size: 1.48 KB
Contents
Factory.sequence :email do |n| "user#{n}@example.com" end Factory.sequence :name do |n| "name#{n}" end Factory.define :user do |user| user.name { "test user" } user.email { Factory.next :email } user.password { "password" } user.password_confirmation { "password" } end Factory.define :account do |f| f.name { Factory.next(:name) } f.keyword { Factory.next(:name) } f.association :plan end Factory.define :membership do |f| f.association :user f.association :account end Factory.define :signup do |f| f.account_name { Factory.next(:name) } f.keyword { Factory.next(:name) } f.user_name { "test user" } f.email { Factory.next :email } f.password { "password" } f.password_confirmation { "password" } f.association :plan end Factory.define :project do |f| f.association :account f.name { Factory.next(:name) } f.keyword { Factory.next(:name) } end Factory.define :permission do |f| f.association :membership f.project {|a| a.association(:project, :account => a.membership.account)} end Factory.define :invitation do |f| f.email { Factory.next(:email) } f.association :account end Factory.define :plan do |f| f.name 'Free' end Factory.define :paid_plan, :parent => :plan do |f| f.name 'Paid' f.price 1 end Factory.define :limit do |f| f.name { Factory.next(:name) } f.association :plan end
Version data entries
40 entries across 40 versions & 1 rubygems