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

15 lines
332 B
Ruby

require 'factory_girl'
require 'rails'
module FactoryGirl
class Railtie < Rails::Railtie
config.after_initialize do
FactoryGirl.definition_file_paths = [
File.join(Rails.root, 'test', 'factories'),
File.join(Rails.root, 'spec', 'factories')
]
FactoryGirl.find_definitions
end
end
end