mirror of
https://github.com/thoughtbot/factory_bot_rails.git
synced 2022-11-09 11:49:18 -05:00
15 lines
332 B
Ruby
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
|
|
|