1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/railties/lib/rails/test_unit/minitest_plugin.rb

16 lines
459 B
Ruby
Raw Normal View History

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 ENV["BACKTRACE"].nil? && !($rails_test_runner && $rails_test_runner.show_backtrace?)
Minitest.backtrace_filter = Rails.backtrace_cleaner
end
end
Minitest.extensions << 'rails'