Module: Bacon::SpecDoxOutput

Included in:
Bacon
Defined in:
lib/mac_bacon.rb

Instance Method Summary collapse

Instance Method Details

#handle_requirement_begin(description) ⇒ Object



36
37
38
# File 'lib/mac_bacon.rb', line 36

def handle_requirement_begin(description)
  print "#{spaces}  - #{description}"
end

#handle_requirement_end(error) ⇒ Object



40
41
42
# File 'lib/mac_bacon.rb', line 40

def handle_requirement_end(error)
  puts error.empty? ? "" : " [#{error}]"
end

#handle_specification_begin(name) ⇒ Object



28
29
30
# File 'lib/mac_bacon.rb', line 28

def handle_specification_begin(name)
  puts spaces + name
end

#handle_specification_endObject



32
33
34
# File 'lib/mac_bacon.rb', line 32

def handle_specification_end
  puts if Counter[:context_depth] == 1
end

#handle_summaryObject



44
45
46
47
48
# File 'lib/mac_bacon.rb', line 44

def handle_summary
  print ErrorLog  if Backtraces
  puts "%d specifications (%d requirements), %d failures, %d errors" %
    Counter.values_at(:specifications, :requirements, :failed, :errors)
end

#spacesObject



50
51
52
# File 'lib/mac_bacon.rb', line 50

def spaces
  "  " * (Counter[:context_depth] - 1)
end