lib/makers/railtie.rb in makers-0.2.0 vs lib/makers/railtie.rb in makers-4.0.0.0

- old
+ new

@@ -1,22 +1,30 @@ module Makers class Railtie < Rails::Railtie - initializer :makers do + initializer 'makers.extensions' do + ActiveSupport::TestCase.include( + Makers::Extensions::ActiveSupport::TestCase + ) + end + + initializer 'makers.replace_fixtures' do config.app_generators.test_framework( config.app_generators.options[:rails][:test_framework], fixture: false ) + end + + config.after_initialize do if Dir.exist?(Rails.root.join('spec')) directory = 'spec' else directory = 'test' end path = Rails.root.join("#{directory}/makers.rb") if File.exist?(path) load path end - ActiveSupport::TestCase.include Makers::Extensions::ActiveSupport::TestCase end end end