Class: TurboTests::DocumentationFormatter
- Inherits:
-
BaseFormatter
- Object
- RSpec::Core::Formatters::BaseTextFormatter
- BaseFormatter
- TurboTests::DocumentationFormatter
- Defined in:
- lib/turbo_tests/documentation_formatter.rb
Overview
An RSpec formatter that prepends the process id to all messages
Instance Method Summary collapse
- #example_failed(notification) ⇒ Object
- #example_passed(notification) ⇒ Object
- #example_pending(notification) ⇒ Object
Methods inherited from BaseFormatter
Instance Method Details
#example_failed(notification) ⇒ Object
28 29 30 31 32 33 34 35 |
# File 'lib/turbo_tests/documentation_formatter.rb', line 28 def example_failed(notification) output.puts RSpec::Core::Formatters::ConsoleCodes.wrap( "#{output_example(notification.example)} (FAILED - #{next_failure_index})", :failure, ) output.flush end |
#example_passed(notification) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/turbo_tests/documentation_formatter.rb', line 8 def example_passed(notification) output.puts RSpec::Core::Formatters::ConsoleCodes.wrap( output_example(notification.example), :success, ) output.flush end |
#example_pending(notification) ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/turbo_tests/documentation_formatter.rb', line 17 def example_pending(notification) = notification.example.execution_result. output.puts RSpec::Core::Formatters::ConsoleCodes.wrap( "#{output_example(notification.example)} (PENDING: #{})", :pending, ) output.flush end |