Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #1 from dstywho/master

factory_girl factories
  • Loading branch information...
commit eea6ba7302e93f29a4cb90015db12863ebd7fc6e 2 parents 2691449 + d26e852
@mjs2600 mjs2600 authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.