aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/test_unit/railtie.rb
blob: f7f07ac05354b9b367090bddc7e5f97114d9aa31 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
module Rails
  class TestUnitRailtie < Rails::Railtie
    railtie_name :test_unit

    config.generators do |c|
      c.test_framework :test_unit, :fixture => true,
                                   :fixture_replacement => nil

      c.integration_tool :test_unit
      c.performance_tool :test_unit
    end

    rake_tasks do
      load "rails/test_unit/testing.rake"
    end

    initializer "test_unit.backtrace_cleaner" do
      # TODO: Figure out how to get the Rails::BacktraceFilter into minitest/unit
      unless defined?(Minitest) || ENV['BACKTRACE']
        require 'rails/backtrace_cleaner'
        Test::Unit::Util::BacktraceFilter.module_eval { include Rails::BacktraceFilterForTestUnit }
      end
    end
  end
end