module Ecom module Model class Engine < ::Rails::Engine isolate_namespace Ecom::Model config.generators.api_only = true config.generators do |g| g.test_framework :rspec g.fixture_replacement :factory_bot g.factory_bot dir: 'spec/factories' end initializer 'ecom_model.factories', after: 'factory_bot.set_factory_paths' do FactoryBot.definition_file_paths << File.expand_path('../../spec/factories', __dir__) if defined?(FactoryBot) end end end end