From b44b6b106b5275b7c6e1329a1530329547ed64d8 Mon Sep 17 00:00:00 2001 From: Joshua Clayton Date: Fri, 3 Jan 2014 14:42:41 -0500 Subject: [PATCH] Support Spring out of the box Closes #120 --- lib/factory_girl_rails/railtie.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/factory_girl_rails/railtie.rb b/lib/factory_girl_rails/railtie.rb index 707be0b..d247130 100644 --- a/lib/factory_girl_rails/railtie.rb +++ b/lib/factory_girl_rails/railtie.rb @@ -19,6 +19,10 @@ module FactoryGirl config.after_initialize do FactoryGirl.find_definitions + + if defined?(Spring) + Spring.after_fork { FactoryGirl.reload } + end end end end