Created
April 27, 2012 17:28
-
-
Save ralphos/2511046 to your computer and use it in GitHub Desktop.
factories
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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