aboutsummaryrefslogblamecommitdiffstats
path: root/railties/lib/rails/commands/test.rb
blob: cd1192eb6e123a42f3fc9820dc93e5a7a836ba52 (plain) (tree)
1
2
3
4
5
6
7
                         
                                
                                  
 
                                                

                                              




                                                                     
                             



                              
                                  
           
ENV["RAILS_ENV"] = "test"
require "rails/test_unit/runner"
require "rails/test_unit/reporter"

options = Rails::TestRunner::Options.parse(ARGV)
$: << File.expand_path("../../test", APP_PATH)

$runner = Rails::TestRunner.new(options)

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

# Config Rails backtrace in tests.
$runner.run