From a38b0dd62d229d9b9533170a7b056c9e02fd971c Mon Sep 17 00:00:00 2001 From: Chris Griego Date: Sat, 27 Aug 2011 16:41:27 -0500 Subject: [PATCH] Load factories from /factories at the Rails root, just like the default definition_file_paths. --- lib/factory_girl_rails/railtie.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/factory_girl_rails/railtie.rb b/lib/factory_girl_rails/railtie.rb index ed2f86d..dbcf7f3 100644 --- a/lib/factory_girl_rails/railtie.rb +++ b/lib/factory_girl_rails/railtie.rb @@ -5,6 +5,7 @@ module FactoryGirl class Railtie < Rails::Railtie config.after_initialize do FactoryGirl.definition_file_paths = [ + File.join(Rails.root, 'factories'), File.join(Rails.root, 'test', 'factories'), File.join(Rails.root, 'spec', 'factories') ]