Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #1 from dstywho/master

factory_girl factories
  • Loading branch information...
commit eea6ba7302e93f29a4cb90015db12863ebd7fc6e 2 parents 2691449 + d26e852
Michael Simpson authored November 16, 2012

Showing 1 changed file with 19 additions and 0 deletions. Show diff stats Hide diff stats

  1. 19  spec/factories.rb
19  spec/factories.rb
... ...
@@ -0,0 +1,19 @@
  1
+require 'factory_girl_rails'
  2
+require 'faker'
  3
+
  4
+FactoryGirl.define do
  5
+
  6
+  factory :event_type do
  7
+    name { Faker::Company.name }
  8
+  end
  9
+
  10
+  factory :event do
  11
+    event_type factory: :event_type
  12
+  end
  13
+
  14
+  factory :timeslot do
  15
+    event   factory: :event 
  16
+    starts_at { Time.now }
  17
+    ends_at   { starts_at + 2.hour }
  18
+  end
  19
+end

0 notes on commit eea6ba7

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