Class: FoodFormatter
- Inherits:
-
RSpec::Core::Formatters::ProgressFormatter
- Object
- RSpec::Core::Formatters::ProgressFormatter
- FoodFormatter
- Defined in:
- lib/food_formatter.rb
Instance Method Summary collapse
- #dump_failures(notification) ⇒ Object
- #dump_pending(notification) ⇒ Object
- #dump_summary(summary) ⇒ Object
- #example_failed(_notification) ⇒ Object
- #example_passed(_notification) ⇒ Object
- #example_pending(_notification) ⇒ Object
Instance Method Details
#dump_failures(notification) ⇒ Object
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/food_formatter.rb', line 28 def dump_failures(notification) return if notification.failure_notifications.empty? formatted = "\nš„© š„© š„© Failure š„© š„© š„©\n" notification.failure_notifications.each_with_index do |failure, index| formatted += failure.fully_formatted(index + 1, ::RSpec::Core::Formatters::ConsoleCodes) end @output.puts(formatted) end |
#dump_pending(notification) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/food_formatter.rb', line 16 def dump_pending(notification) return if notification.pending_examples.empty? formatted = "\nšŗ šŗ šŗ Pending šŗ šŗ šŗ\n" notification.pending_notifications.each_with_index do |pending, index| formatted << pending.fully_formatted(index + 1, ::RSpec::Core::Formatters::ConsoleCodes) end @output.puts(formatted) end |
#dump_summary(summary) ⇒ Object
39 40 41 |
# File 'lib/food_formatter.rb', line 39 def dump_summary(summary) @output.puts(totals_line(summary)) end |
#example_failed(_notification) ⇒ Object
12 13 14 |
# File 'lib/food_formatter.rb', line 12 def example_failed(_notification) @output.print(' š„© ') end |
#example_passed(_notification) ⇒ Object
4 5 6 |
# File 'lib/food_formatter.rb', line 4 def example_passed(_notification) @output.print(' š„ ') end |
#example_pending(_notification) ⇒ Object
8 9 10 |
# File 'lib/food_formatter.rb', line 8 def example_pending(_notification) @output.print(' šŗ ') end |