Sha256: ecf8dda4546c3a38528bf0a53b779b32391c81ee68ac491584c1f27a85d1656c
Contents?: true
Size: 1.02 KB
Versions: 7
Compression:
Stored size: 1.02 KB
Contents
# frozen_string_literal: true require "fixtury" module Fixtury class Railtie < ::Rails::Railtie initializer "fixtury.configure" do ::Fixtury.configure do |config| config.filepath = Rails.root.join("tmp/fixtury.yml") config.add_dependency_path ::Rails.root.join("db/schema.rb") config.add_dependency_path ::Rails.root.join("db/seeds.rb") config.add_dependency_path ::Rails.root.join("db/seeds/**/*.rb") config.add_fixture_path ::Rails.root.join("test/fixtures/**/*.rb") config.locator_backend = :global_id end end initializer "fixtury.load_hooks" do ActiveSupport.on_load(:active_record) do require "fixtury/mutation_observer" prepend Fixtury::MutationObserver::ActiveRecordHooks end ActiveSupport.on_load(:active_support_test_case) do require "fixtury/minitest_hooks" prepend Fixtury::MinitestHooks ::Minitest.after_run do ::Fixtury.configuration.dump_file end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems