Skip to content
Browse files

Merge pull request #1 from dstywho/master

factory_girl factories
  • Loading branch information...
2 parents 2691449 + d26e852 commit eea6ba7302e93f29a4cb90015db12863ebd7fc6e @mjs2600 mjs2600 committed
Showing with 19 additions and 0 deletions.
  1. +19 −0 spec/factories.rb
View
19 spec/factories.rb
@@ -0,0 +1,19 @@
+require 'factory_girl_rails'
+require 'faker'
+
+FactoryGirl.define do
+
+ factory :event_type do
+ name { Faker::Company.name }
+ end
+
+ factory :event do
+ event_type factory: :event_type
+ end
+
+ factory :timeslot do
+ event factory: :event
+ starts_at { Time.now }
+ ends_at { starts_at + 2.hour }
+ end
+end

0 comments on commit eea6ba7

Please sign in to comment.
Something went wrong with that request. Please try again.