Class: Minitest::Silence::FailOnOutputReporter

Inherits:
Reporter
  • Object
show all
Defined in:
lib/minitest/silence/fail_on_output_reporter.rb

Instance Method Summary collapse

Instance Method Details

#record(result) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/minitest/silence/fail_on_output_reporter.rb', line 6

def record(result)
  unless result.output.empty?
    assertion = Minitest::Assertion.new("      The test unexpectedly wrote output to STDOUT or STDERR.\n\n      \#{Minitest::Silence.boxed('Output', result.output)}\n    EOM\n    assertion.set_backtrace(caller)\n    result.failures << assertion\n  end\nend\n".chomp)