Sha256: d4353927805c06e49b3b51bfd74f6a4316b78f4c65ff5ff20eebd3b094cf1cb7

Contents?: true

Size: 1.25 KB

Versions: 6

Compression:

Stored size: 1.25 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 :email_confirmed_user, :parent => :user do |user|
  user.email_confirmed { true }
end

Factory.define :account do |f|
  f.name { Factory.next(:name) }
  f.url  { Factory.next(:name) }
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.url                   { Factory.next(:name) }
  f.user_name             { "test user" }
  f.email                 { Factory.next :email }
  f.password              { "password" }
  f.password_confirmation { "password" }
end

Factory.define :project do |f|
  f.association :account
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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
saucy-0.1.9 lib/generators/saucy/features/templates/factories.rb
saucy-0.1.8 lib/generators/saucy/features/templates/factories.rb
saucy-0.1.7 lib/generators/saucy/features/templates/factories.rb
saucy-0.1.6 lib/generators/saucy/features/templates/factories.rb
saucy-0.1.5 lib/generators/saucy/features/templates/factories.rb
saucy-0.1.4 lib/generators/saucy/features/templates/factories.rb