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

Version Path
saucy-0.2.28.1 lib/generators/saucy/features/templates/factories.rb
saucy-0.2.39 lib/generators/saucy/features/templates/factories.rb
saucy-0.2.38 lib/generators/saucy/features/templates/factories.rb
saucy-0.2.36 lib/generators/saucy/features/templates/factories.rb
saucy-0.2.35 lib/generators/saucy/features/templates/factories.rb
saucy-0.2.34 lib/generators/saucy/features/templates/factories.rb
saucy-0.2.33 lib/generators/saucy/features/templates/factories.rb
saucy-0.2.32 lib/generators/saucy/features/templates/factories.rb
saucy-0.2.31 lib/generators/saucy/features/templates/factories.rb
saucy-0.2.30 lib/generators/saucy/features/templates/factories.rb
saucy-0.2.29 lib/generators/saucy/features/templates/factories.rb
saucy-0.2.28 lib/generators/saucy/features/templates/factories.rb
saucy-0.2.27 lib/generators/saucy/features/templates/factories.rb
saucy-0.2.26 lib/generators/saucy/features/templates/factories.rb
saucy-0.2.25 lib/generators/saucy/features/templates/factories.rb
saucy-0.2.24 lib/generators/saucy/features/templates/factories.rb
saucy-0.2.21 lib/generators/saucy/features/templates/factories.rb
saucy-0.2.20 lib/generators/saucy/features/templates/factories.rb
saucy-0.2.18 lib/generators/saucy/features/templates/factories.rb
saucy-0.2.17 lib/generators/saucy/features/templates/factories.rb