lib/minitest/reporter_runner.rb in minitest-reporters-0.14.17 vs lib/minitest/reporter_runner.rb in minitest-reporters-0.14.18

- old
+ new

@@ -20,15 +20,19 @@ def initialize super self.reporters = [] @test_results = {} @test_recorder = TestRecorder.new + @allow_default_output = true end - def _run_suites(suites, type) - output.puts "# Run options: #{@help}" + def run_tests + @allow_default_output = false + super + end + def _run_suites(suites, type) @suites_start_time = Time.now count_tests!(suites, type) trigger_callback(:before_suites, suites, type) super(suites, type) ensure @@ -73,12 +77,20 @@ trigger_callback(:after_test, suite, test.to_sym) end # Stub out the three IO methods used by the built-in reporter. - def puts(*args); end - def print(*args); end - def status(io = output); end + def puts(*args) + super if @allow_default_output + end + + def print(*args) + super if @allow_default_output + end + + def status(io = output) + super if @allow_default_output + end private def trigger_callback(callback, *args) reporters.each { |r| r.public_send(callback, *args) }