aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2015-12-27 20:01:43 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2016-01-11 12:36:09 +0900
commitd82bf140030a62d216e68a81e63ea5d97c45125b (patch)
treea9285077f054dc5f0d7cda865c0808117451dd6e /railties/lib
parentc56e56773815221ef1fbd127f949c3e5207ea471 (diff)
downloadrails-d82bf140030a62d216e68a81e63ea5d97c45125b.tar.gz
rails-d82bf140030a62d216e68a81e63ea5d97c45125b.tar.bz2
rails-d82bf140030a62d216e68a81e63ea5d97c45125b.zip
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.
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/test_unit/minitest_plugin.rb3
1 files changed, 2 insertions, 1 deletions
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 @@ module Minitest
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