Sha256: 036487f8aaa2a1503b97a43cfdb8c618f55f56becd4dec84b06020130e0ed290

Contents?: true

Size: 587 Bytes

Versions: 27

Compression:

Stored size: 587 Bytes

Contents

Factory.sequence :email do |n|
  "user#{n}@example.com"
end

Factory.sequence :facebook_id do |n|
  n
end

Factory.define :user do |user|
  user.email                 { Factory.next :email }
  user.first_name            { "Factory" }
  user.last_name             { "User" }
  user.password              { "password" }
  user.password_confirmation { "password" }
end

Factory.define :admin_user, :parent => :user do |admin|
  admin.role                 'admin'
end

Factory.define :facebook_user, :parent => :user do |user|
  user.facebook_uid           { Factory.next :facebook_id }
end

Version data entries

27 entries across 26 versions & 4 rubygems

Version Path
headstart-0.11.2 generators/headstart/templates/factories.rb
headstart-0.11.1 generators/headstart/templates/factories.rb
headstart-0.9.2 generators/headstart/templates/factories.rb
headstart-0.9.1 generators/headstart/templates/factories.rb
headstart-0.9.0 generators/headstart/templates/factories.rb
headstart-0.8.0 generators/headstart/templates/factories.rb
headstart-0.7.0 generators/headstart/templates/factories.rb
headstart-0.6.2 generators/headstart/templates/factories.rb
headstart-0.6.1 generators/headstart/templates/factories.rb
headstart-0.6.0 generators/headstart/templates/factories.rb
headstart-0.5.5 generators/headstart/templates/factories.rb
headstart-0.5.4 generators/headstart/templates/factories.rb
headstart-0.5.3 generators/headstart/templates/factories.rb
headstart-0.5.2 generators/headstart/templates/factories.rb
headstart-0.5.1 generators/headstart/templates/factories.rb
headstart-0.5.0 generators/headstart/templates/factories.rb
headstart-0.4.2 generators/headstart/templates/factories.rb
headstart-0.4.1 generators/headstart/templates/factories.rb
headstart-0.4.0 generators/headstart/templates/factories.rb
headstart-0.3.0 generators/headstart/templates/factories.rb