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

Inherits:
BaseTextFormatter show all
Defined in:
lib/gems/rspec-1.1.12/lib/spec/runner/formatter/progress_bar_formatter.rb

Direct Known Subclasses

ProfileFormatter

Instance Attribute Summary

Attributes inherited from BaseTextFormatter

#output, #pending_examples

Attributes inherited from BaseFormatter

#example_group, #options, #where

Instance Method Summary collapse

Methods inherited from BaseTextFormatter

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

Methods inherited from BaseFormatter

#add_example_group, #close, #dump_failure, #dump_pending, #dump_summary, #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

#method_missing(sym, *args) ⇒ Object



28
29
30
# File 'lib/gems/rspec-1.1.12/lib/spec/runner/formatter/progress_bar_formatter.rb', line 28

def method_missing(sym, *args)
  # ignore
end

Instance Method Details

#example_failed(example, counter, failure) ⇒ Object



7
8
9
10
# File 'lib/gems/rspec-1.1.12/lib/spec/runner/formatter/progress_bar_formatter.rb', line 7

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

#example_passed(example) ⇒ Object



12
13
14
15
# File 'lib/gems/rspec-1.1.12/lib/spec/runner/formatter/progress_bar_formatter.rb', line 12

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

#example_pending(example, message, pending_caller) ⇒ Object



17
18
19
20
21
# File 'lib/gems/rspec-1.1.12/lib/spec/runner/formatter/progress_bar_formatter.rb', line 17

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

#start_dumpObject



23
24
25
26
# File 'lib/gems/rspec-1.1.12/lib/spec/runner/formatter/progress_bar_formatter.rb', line 23

def start_dump
  @output.puts
  @output.flush
end