1
0
Fork 0
mirror of https://github.com/thoughtbot/factory_bot_rails.git synced 2022-11-09 11:49:18 -05:00
thoughtbot--factory_bot_rails/lib/factory_girl_rails/railtie.rb

16 lines
319 B
Ruby
Raw Permalink Normal View History

2010-06-09 11:42:48 -04:00
require 'factory_girl'
require 'rails'
class Factory
class Railtie < Rails::Railtie
config.after_initialize do
Factory.definition_file_paths = [
File.join(Rails.root, 'test', 'factories'),
File.join(Rails.root, 'spec', 'factories')
]
Factory.find_definitions
end
end
end