lib/minitest/rails/railtie.rb in minitest-rails-2.0.0 vs lib/minitest/rails/railtie.rb in minitest-rails-2.0.1

- old
+ new

@@ -1,13 +1,20 @@ +if defined?(Rake.application) && Rake.application.top_level_tasks.grep(/^test(?::|$)/).any? + ENV['RAILS_ENV'] ||= 'test' +end + require "rails" module Minitest module Rails - class Railtie < ::Rails::Railtie # :nodoc: - generators = config.respond_to?(:app_generators) ? config.app_generators : config.generators - generators.integration_tool :minitest - generators.test_framework :minitest - generators.fallbacks[:minitest] = :test_unit + class Railtie < ::Rails::Railtie + config.app_generators do |c| + c.test_framework :minitest, + fixture: true, + fixture_replacement: nil + c.integration_tool :minitest + c.fallbacks[:minitest] = :test_unit + end rake_tasks do load "rails/test_unit/testing.rake" end end