aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/test_unit/minitest_plugin.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/test_unit/minitest_plugin.rb')
-rw-r--r--railties/lib/rails/test_unit/minitest_plugin.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/railties/lib/rails/test_unit/minitest_plugin.rb b/railties/lib/rails/test_unit/minitest_plugin.rb
index 3a0a58df88..d1ba35a5ec 100644
--- a/railties/lib/rails/test_unit/minitest_plugin.rb
+++ b/railties/lib/rails/test_unit/minitest_plugin.rb
@@ -3,6 +3,16 @@ require "rails/test_unit/reporter"
require "rails/test_unit/test_requirer"
module Minitest
+ mattr_accessor(:hide_aggregated_results) { false }
+
+ module AggregatedResultSuppresion
+ def aggregated_results
+ super unless Minitest.hide_aggregated_results
+ end
+ end
+
+ SummaryReporter.prepend AggregatedResultSuppresion
+
def self.plugin_rails_options(opts, options)
opts.separator ""
opts.separator "Usage: bin/rails test [options] [files or directories]"
@@ -38,6 +48,7 @@ module Minitest
options[:fail_fast] = true
end
+ options[:output_inline] = true
options[:patterns] = opts.order!
end
@@ -63,6 +74,9 @@ module Minitest
Minitest.backtrace_filter = ::Rails.backtrace_cleaner if ::Rails.respond_to?(:backtrace_cleaner)
end
+ # Disable the extra failure output after a run, unless output is deferred.
+ self.hide_aggregated_results = options[:output_inline]
+
self.reporter << ::Rails::TestUnitReporter.new(options[:io], options)
end