Class: MicroTest::BaseFormatter
- Inherits:
-
Object
- Object
- MicroTest::BaseFormatter
- Includes:
- Color
- Defined in:
- lib/micro_test/formatters/base_formatter.rb
Overview
The base class for formatters. Defines the API that formatters can/should implement to control test run output.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#failed ⇒ Object
Returns the value of attribute failed.
-
#passed ⇒ Object
Returns the value of attribute passed.
Instance Method Summary collapse
- #after_class(test_class) ⇒ Object
- #after_results(runner) ⇒ Object
- #after_suite(test_classes) ⇒ Object
- #after_test(test) ⇒ Object
- #before_class(test_class) ⇒ Object
- #before_suite(test_classes) ⇒ Object
- #before_test(test) ⇒ Object
-
#initialize ⇒ BaseFormatter
constructor
A new instance of BaseFormatter.
Constructor Details
#initialize ⇒ BaseFormatter
Returns a new instance of BaseFormatter.
12 13 14 15 16 |
# File 'lib/micro_test/formatters/base_formatter.rb', line 12 def initialize @duration = 0 @passed = 0 @failed = 0 end |
Instance Attribute Details
#duration ⇒ Object
Returns the value of attribute duration.
10 11 12 |
# File 'lib/micro_test/formatters/base_formatter.rb', line 10 def duration @duration end |
#failed ⇒ Object
Returns the value of attribute failed.
10 11 12 |
# File 'lib/micro_test/formatters/base_formatter.rb', line 10 def failed @failed end |
#passed ⇒ Object
Returns the value of attribute passed.
10 11 12 |
# File 'lib/micro_test/formatters/base_formatter.rb', line 10 def passed @passed end |
Instance Method Details
#after_class(test_class) ⇒ Object
30 31 |
# File 'lib/micro_test/formatters/base_formatter.rb', line 30 def after_class(test_class) end |
#after_results(runner) ⇒ Object
33 34 35 36 37 |
# File 'lib/micro_test/formatters/base_formatter.rb', line 33 def after_results(runner) @duration = runner.duration @passed = runner.passed @failed = runner.failed end |
#after_suite(test_classes) ⇒ Object
39 40 |
# File 'lib/micro_test/formatters/base_formatter.rb', line 39 def after_suite(test_classes) end |
#after_test(test) ⇒ Object
27 28 |
# File 'lib/micro_test/formatters/base_formatter.rb', line 27 def after_test(test) end |
#before_class(test_class) ⇒ Object
21 22 |
# File 'lib/micro_test/formatters/base_formatter.rb', line 21 def before_class(test_class) end |
#before_suite(test_classes) ⇒ Object
18 19 |
# File 'lib/micro_test/formatters/base_formatter.rb', line 18 def before_suite(test_classes) end |
#before_test(test) ⇒ Object
24 25 |
# File 'lib/micro_test/formatters/base_formatter.rb', line 24 def before_test(test) end |