From d82bf140030a62d216e68a81e63ea5d97c45125b Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Sun, 27 Dec 2015 20:01:43 +0900 Subject: [PATCH] delete only unnecessary reporter Reporter that defines its own users at the time of this process are also loaded, to avoid them from being deleted, to delete only the specified to unnecessary reporter. --- railties/lib/rails/test_unit/minitest_plugin.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/railties/lib/rails/test_unit/minitest_plugin.rb b/railties/lib/rails/test_unit/minitest_plugin.rb index d4ab2ada66..29a3d991b8 100644 --- a/railties/lib/rails/test_unit/minitest_plugin.rb +++ b/railties/lib/rails/test_unit/minitest_plugin.rb @@ -80,7 +80,8 @@ def self.plugin_rails_init(options) Minitest.backtrace_filter = ::Rails.backtrace_cleaner if ::Rails.respond_to?(:backtrace_cleaner) end - self.reporter.reporters.clear # Replace progress reporter for colors. + # Replace progress reporter for colors. + self.reporter.reporters.delete_if { |reporter| reporter.kind_of?(SummaryReporter) || reporter.kind_of?(ProgressReporter) } self.reporter << SuppressedSummaryReporter.new(options[:io], options) self.reporter << ::Rails::TestUnitReporter.new(options[:io], options) end -- GitLab