Class: ColorPoundSpecReporter
- Inherits:
-
Minitest::Reporters::SpecReporter
- Object
- Minitest::Reporters::SpecReporter
- ColorPoundSpecReporter
- Defined in:
- lib/color_pound_spec_reporter.rb,
lib/color_pound_spec_reporter/version.rb
Constant Summary collapse
- VERSION =
"0.0.9"
Instance Method Summary collapse
- #error(suite, test, test_runner) ⇒ Object
- #failure(suite, test, test_runner) ⇒ Object
-
#pass(suite, test, test_runner) ⇒ Object
minitest-reporters methods for version 0.14.24.
-
#record(test) ⇒ Object
Just in case we load a more recent minitest-reporters v1.
- #skip(suite, test, test_runner) ⇒ Object
Instance Method Details
#error(suite, test, test_runner) ⇒ Object
20 21 22 23 |
# File 'lib/color_pound_spec_reporter.rb', line 20 def error(suite, test, test_runner) common_print(suite, test, :red, 'ERROR') print_exception(test_runner.exception, 'ERROR') end |
#failure(suite, test, test_runner) ⇒ Object
15 16 17 18 |
# File 'lib/color_pound_spec_reporter.rb', line 15 def failure(suite, test, test_runner) common_print(suite, test, :red, 'FAIL') print_exception(test_runner.exception, 'FAIL') end |
#pass(suite, test, test_runner) ⇒ Object
minitest-reporters methods for version 0.14.24
7 8 9 |
# File 'lib/color_pound_spec_reporter.rb', line 7 def pass(suite, test, test_runner) common_print(suite, test, :green, 'PASS') end |
#record(test) ⇒ Object
Just in case we load a more recent minitest-reporters v1
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/color_pound_spec_reporter.rb', line 26 def record(test) Minitest::Reporters::BaseReporter.instance_method(:record).bind(self).call(test) print_colored_status(test) print(" (%.2fs)" % test.time) print " :: #{color_pound test.name}" if !test.skipped? && test.failure print_exception(test.failure, test.error? ? 'ERROR' : '' ) else puts end end |
#skip(suite, test, test_runner) ⇒ Object
11 12 13 |
# File 'lib/color_pound_spec_reporter.rb', line 11 def skip(suite, test, test_runner) common_print(suite, test, :yellow, 'SKIP') end |