Sha256: affc3c7af6b86c30684e5ad76f58d2ded28afd8d078d787a4632b7d157d7a8f8

Contents?: true

Size: 612 Bytes

Versions: 1

Compression:

Stored size: 612 Bytes

Contents

module Makers
  class Railtie < Rails::Railtie

    config.app_generators.test_framework(
      config.app_generators.options[:rails][:test_framework],
      fixture: false
    )

    config.before_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
    end

    initializer 'makers.active_support' do
      ActiveSupport::TestCase.include(
        Makers::Extensions::ActiveSupport::TestCase
      )
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
makers-4.0.0.3 lib/makers/railtie.rb