Sha256: 4d0ecf13d6956c7806e91ea934e8a82537ec8de32e1b8f0e495ff3e24008f4ea
Contents?: true
Size: 652 Bytes
Versions: 5
Compression:
Stored size: 652 Bytes
Contents
require 'factory_bot' require 'factory_bot_rails/generator' require 'rails' module FactoryBot class Railtie < Rails::Railtie initializer "factory_bot.set_fixture_replacement" do FactoryBotRails::Generator.new(config).run end initializer "factory_bot.set_factory_paths" do FactoryBot.definition_file_paths = [ Rails.root.join('factories'), Rails.root.join('test', 'factories'), Rails.root.join('spec', 'factories') ] end config.after_initialize do FactoryBot.find_definitions if defined?(Spring) Spring.after_fork { FactoryBot.reload } end end end end
Version data entries
5 entries across 5 versions & 1 rubygems