module Core class Engine < ::Rails::Engine initializer :append_paths do |app| app.config.paths['db'] = config.paths['db'].expanded app.config.paths['db/migrate'] = config.paths['db/migrate'].expanded # So we can use core factories in the main app if defined?(FactoryBot) FactoryBot.definition_file_paths.unshift(Core.root.join('spec', 'factories')) end end end end