aboutsummaryrefslogblamecommitdiffstats
path: root/railties/lib/rails/test_unit/minitest_plugin.rb
blob: 70ce9d3360182283c18d165641b660e04e12d940 (plain) (tree)
1
2
3
4
5
6
7
8
9








                                                                     
                                                                



                                                       
require "minitest"
require "rails/test_unit/reporter"

def Minitest.plugin_rails_init(options)
  self.reporter << Rails::TestUnitReporter.new(options[:io], options)
  if $rails_test_runner && (method = $rails_test_runner.find_method)
    options[:filter] = method
  end

  if !($rails_test_runner && $rails_test_runner.show_backtrace?)
    Minitest.backtrace_filter = Rails.backtrace_cleaner
  end
end
Minitest.extensions << 'rails'