Class: Spec::Runner::Formatter::ProgressBarFormatter

Inherits:
BaseTextFormatter show all
Defined in:
lib/spec/runner/formatter/progress_bar_formatter.rb

Instance Attribute Summary

Attributes inherited from BaseTextFormatter

#dry_run

Instance Method Summary collapse

Methods inherited from BaseTextFormatter

#close, #colour=, #colourise, #dump_failure, #dump_pending, #dump_summary, #format_backtrace, #initialize

Methods inherited from BaseFormatter

#close, #dump_failure, #dump_pending, #dump_summary, #example_started, #initialize, #start

Constructor Details

This class inherits a constructor from Spec::Runner::Formatter::BaseTextFormatter

Instance Method Details

#add_behaviour(name) ⇒ Object



5
6
# File 'lib/spec/runner/formatter/progress_bar_formatter.rb', line 5

def add_behaviour(name)
end

#example_failed(example, counter, failure) ⇒ Object



8
9
10
11
# File 'lib/spec/runner/formatter/progress_bar_formatter.rb', line 8

def example_failed(example, counter, failure)
  @output.print colourise('F', failure)
  @output.flush
end

#example_passed(example) ⇒ Object



13
14
15
16
# File 'lib/spec/runner/formatter/progress_bar_formatter.rb', line 13

def example_passed(example)
  @output.print green('.')
  @output.flush
end

#example_pending(behaviour_name, example_name, message) ⇒ Object



18
19
20
21
22
# File 'lib/spec/runner/formatter/progress_bar_formatter.rb', line 18

def example_pending(behaviour_name, example_name, message)
  super
  @output.print yellow('P')
  @output.flush
end

#start_dumpObject



24
25
26
27
# File 'lib/spec/runner/formatter/progress_bar_formatter.rb', line 24

def start_dump
  @output.puts
  @output.flush
end