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

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

Direct Known Subclasses

ProfileFormatter

Instance Attribute Summary

Attributes inherited from BaseTextFormatter

#example_group, #output

Instance Method Summary collapse

Methods included from NOOPMethodMissing

#respond_to?

Methods inherited from BaseTextFormatter

#close, #colorize_failure, #colourise, #dump_failure, #dump_pending, #dump_summary, #example_group_started, #format_backtrace, #initialize

Methods inherited from BaseFormatter

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

Constructor Details

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

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Spec::Runner::Formatter::NOOPMethodMissing

Instance Method Details

#example_failed(example, counter, failure) ⇒ Object



10
11
12
13
# File 'lib/spec/runner/formatter/progress_bar_formatter.rb', line 10

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

#example_passed(example) ⇒ Object



15
16
17
18
# File 'lib/spec/runner/formatter/progress_bar_formatter.rb', line 15

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

#example_pending(example, message, deprecated_pending_location = nil) ⇒ Object



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

def example_pending(example, message, deprecated_pending_location=nil)
  super
  @output.print yellow('*')
  @output.flush
end

#start_dumpObject



26
27
28
29
# File 'lib/spec/runner/formatter/progress_bar_formatter.rb', line 26

def start_dump
  @output.puts
  @output.flush
end