Permalink
Browse files

factories for events, timeslots

  • Loading branch information...
1 parent 010bd3f commit d26e852c9781cc05e55ac2a214bad5bf12470a3a @dstywho dstywho committed Nov 17, 2012
Showing with 19 additions and 0 deletions.
  1. +19 −0 spec/factories.rb
View
@@ -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 d26e852

Please sign in to comment.