Class: Quarry::Reporter::Summary
Overview
Summary Reporter
Similar to the Verbatim reporter, but does not display test code for passing tests.
Constant Summary
ANSICode
Instance Attribute Summary
#error, #fail, #pass, #steps
Instance Method Summary
collapse
#initialize, #report_end, #report_intro, #report_start, #report_step, #report_step_end, #report_summary
Instance Method Details
18
19
20
21
22
|
# File 'lib/quarry/reporter/summary.rb', line 18
def (step)
txt = step.to_s.tabto(2)
txt[0,1] = "*"
puts txt
end
|
#report_error(step, exception) ⇒ Object
46
47
48
49
50
51
52
53
54
55
56
|
# File 'lib/quarry/reporter/summary.rb', line 46
def report_error(step, exception)
raise exception if $DEBUG
msg = ''
msg << " ##### ERROR #####\n"
msg << " # " + exception.to_s + "\n"
msg << " # " + exception.backtrace[0]
msg = ANSICode.magenta(msg)
puts msg
puts ANSICode.red("#{step}")
end
|
#report_fail(step, assertion) ⇒ Object
36
37
38
39
40
41
42
43
44
|
# File 'lib/quarry/reporter/summary.rb', line 36
def report_fail(step, assertion)
msg = ''
msg << " ##### FAIL #####\n"
msg << " # " + assertion.to_s
msg = ANSICode.magenta(msg)
puts msg
puts ANSICode.red("#{step}")
end
|
14
15
16
|
# File 'lib/quarry/reporter/summary.rb', line 14
def (step)
puts ANSICode.bold("#{step}")
end
|
#report_macro(step) ⇒ Object
24
25
26
27
28
29
30
|
# File 'lib/quarry/reporter/summary.rb', line 24
def report_macro(step)
txt = step.to_s.tabto(2)
txt[0,1] = "*"
puts txt
end
|
#report_pass(step) ⇒ Object
32
33
34
|
# File 'lib/quarry/reporter/summary.rb', line 32
def report_pass(step)
end
|