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

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

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 PlainTextFormatter

#collected_steps, #initialize, #method_missing, #scenario_failed, #scenario_pending, #scenario_started, #scenario_succeeded, #step_failed, #step_pending, #step_succeeded, #step_upcoming

Methods inherited from BaseTextFormatter

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

Methods inherited from BaseFormatter

#add_example_group, #close, #dump_failure, #dump_pending, #dump_summary, #example_failed, #example_passed, #example_pending, #example_started, #initialize, #start, #start_dump

Constructor Details

This class inherits a constructor from Spec::Runner::Formatter::Story::PlainTextFormatter

Dynamic Method Handling

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

Instance Method Details

#run_endedObject



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

def run_ended
  @output.puts
  @output.puts
  @output.puts "Finished in %f seconds" % (Time.now - @start_time)
  @output.puts
  super
end

#run_started(count) ⇒ Object



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

def run_started(count)
  @start_time = Time.now
  super
end

#scenario_endedObject



25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/gems/rspec-1.1.12/lib/spec/runner/formatter/story/progress_bar_formatter.rb', line 25

def scenario_ended
  if @scenario_failed
    @output.print red('F')
    @output.flush
  elsif @scenario_pending
    @output.print yellow('P')
    @output.flush
  else
    @output.print green('.')
    @output.flush
  end
end

#story_ended(title, narrative) ⇒ Object



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

def story_ended(title, narrative) end

#story_started(title, narrative) ⇒ Object



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

def story_started(title, narrative) end