Class: Spec::Runner::Formatter::SparkyProgressFormatter

Inherits:
ProgressBarFormatter
  • Object
show all
Defined in:
lib/sparky_progress_formatter.rb

Constant Summary collapse

@@anything_failed_ever =
false
@@anything_pended_ever =
false

Instance Method Summary collapse

Constructor Details

#initialize(a, b) ⇒ SparkyProgressFormatter

Returns a new instance of SparkyProgressFormatter.



13
14
15
16
17
# File 'lib/sparky_progress_formatter.rb', line 13

def initialize(a,b)
  super
  @sparky = Sparky.new
  @sparky.start_run
end

Instance Method Details

#example_failed(example, counter, failure) ⇒ Object



29
30
31
32
33
# File 'lib/sparky_progress_formatter.rb', line 29

def example_failed(example, counter, failure)
  @@anything_failed_ever = true
  @sparky.example_failed
  super
end

#example_passed(example) ⇒ Object



24
25
26
27
# File 'lib/sparky_progress_formatter.rb', line 24

def example_passed(example)
  @sparky.example_passed
  super
end

#example_pending(example, message) ⇒ Object



35
36
37
38
39
# File 'lib/sparky_progress_formatter.rb', line 35

def example_pending(example, message)
  @@anything_pended_ever = true
  @sparky.example_pending
  super
end

#start_dumpObject



19
20
21
22
# File 'lib/sparky_progress_formatter.rb', line 19

def start_dump
  @sparky.finish_run
  super
end