Class: Testrus::Tester::Formatter::Default
- Inherits:
-
Object
- Object
- Testrus::Tester::Formatter::Default
- Defined in:
- lib/testrus/tester/formatter/default.rb
Instance Attribute Summary collapse
-
#run ⇒ Object
readonly
Returns the value of attribute run.
Instance Method Summary collapse
-
#initialize(run) ⇒ Default
constructor
Public: The formatter is responsible for reporting the run data to the user.
-
#report ⇒ Object
Public: Creates the actual report.
Constructor Details
#initialize(run) ⇒ Default
Public: The formatter is responsible for reporting the run data to the user. New formatters can easily be added here. The layout of this formatter should be used for guidance on how to create new formatters. Also see the documentation for Run and the sources to find what information is available to the formatter.
The formatter does not return anything useful, it is simply used to report to the user. The default formatter simply reports to STDOUT.
run - The Run containing the run data (memory usage, output, cpu time,
etc.)
21 22 23 |
# File 'lib/testrus/tester/formatter/default.rb', line 21 def initialize(run) @run = run end |
Instance Attribute Details
#run ⇒ Object (readonly)
Returns the value of attribute run.
7 8 9 |
# File 'lib/testrus/tester/formatter/default.rb', line 7 def run @run end |
Instance Method Details
#report ⇒ Object
Public: Creates the actual report.
26 27 28 |
# File 'lib/testrus/tester/formatter/default.rb', line 26 def report run.passed? && run.within_constraints? ? report_success : report_failure end |