Class: TurboTests::ProgressFormatter

Inherits:
BaseFormatter
  • Object
show all
Defined in:
lib/turbo_tests/progress_formatter.rb

Constant Summary collapse

LINE_LENGTH =
80

Instance Method Summary collapse

Methods inherited from BaseFormatter

#dump_summary

Constructor Details

#initialize(*args) ⇒ ProgressFormatter

Returns a new instance of ProgressFormatter.



15
16
17
18
# File 'lib/turbo_tests/progress_formatter.rb', line 15

def initialize(*args)
  super
  @examples = 0
end

Instance Method Details

#example_failed(_notification) ⇒ Object



30
31
32
33
# File 'lib/turbo_tests/progress_formatter.rb', line 30

def example_failed(_notification)
  output.print RSpec::Core::Formatters::ConsoleCodes.wrap("F", :failure)
  wrap
end

#example_passed(_notification) ⇒ Object



20
21
22
23
# File 'lib/turbo_tests/progress_formatter.rb', line 20

def example_passed(_notification)
  output.print RSpec::Core::Formatters::ConsoleCodes.wrap(".", :success)
  wrap
end

#example_pending(_notification) ⇒ Object



25
26
27
28
# File 'lib/turbo_tests/progress_formatter.rb', line 25

def example_pending(_notification)
  output.print RSpec::Core::Formatters::ConsoleCodes.wrap("*", :pending)
  wrap
end

#start_dump(_notification) ⇒ Object



35
36
37
# File 'lib/turbo_tests/progress_formatter.rb', line 35

def start_dump(_notification)
  output.puts
end