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