Skip to content

Instantly share code, notes, and snippets.

@ralphos
Created April 27, 2012 17:28
Show Gist options
  • Save ralphos/2511046 to your computer and use it in GitHub Desktop.
Save ralphos/2511046 to your computer and use it in GitHub Desktop.
factories
Factory.define :user do |u|
u.full_name 'John'
u.email 'some@email.com'
u.password 'foobar'
u.password_confirmation 'foobar'
u.admin false
u.coach false
u.bio 'This is my short bio'
end
Factory.define :coach do |c|
c.full_name 'Coach'
c.email 'coach@email.com'
c.password 'foobar'
c.password_confirmation 'foobar'
c.admin false
c.coach true
c.bio 'This is my short bio'
c.who_for 'A bit about who should book a lesson'
end
Factory.define :conversation do |conv|
conv.sender 'user_id'
end
Factory.define :message do |d|
d.message 'this is my awesome message...'
end
Factory.define :booking do |b|
b.status 0
b.user_id 1
b.coach_id 2
b.start_at '4pm 1/3/12'
b.end_at '5pm 1/3/12'
b.lesson_details 'What the lesson is about'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment