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

Inherits:
PlainTextFormatter
  • Object
show all
Defined in:
lib/spec/runner/formatter/story/progress_bar_formatter.rb

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

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/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/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/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/spec/runner/formatter/story/progress_bar_formatter.rb', line 10

def story_ended(title, narrative) end

#story_started(title, narrative) ⇒ Object



9
# File 'lib/spec/runner/formatter/story/progress_bar_formatter.rb', line 9

def story_started(title, narrative) end