Class: QED::Reporter::Summary
Overview
Summary Reporter
Similar to the Verbatim reporter, but does not display test code for passing tests.
Constant Summary
Constants inherited
from BaseClass
BaseClass::ANSICode
Instance Attribute Summary
Attributes inherited from BaseClass
#error, #fail, #io, #pass, #steps
Instance Method Summary
collapse
Methods inherited from BaseClass
#initialize, #report_end, #report_intro, #report_omit, #report_start, #report_step, #report_step_end, #report_summary
Instance Method Details
16
17
18
19
20
|
# File 'lib/qed/reporter/summary.rb', line 16
def (step)
txt = step.to_s.tabto(2)
txt[0,1] = "*"
io.puts txt
end
|
#report_error(step, exception) ⇒ Object
44
45
46
47
48
49
50
51
52
53
54
|
# File 'lib/qed/reporter/summary.rb', line 44
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)
io.puts msg
io.puts ANSICode.red("#{step}")
end
|
#report_fail(step, assertion) ⇒ Object
34
35
36
37
38
39
40
41
42
|
# File 'lib/qed/reporter/summary.rb', line 34
def report_fail(step, assertion)
msg = ''
msg << " ##### FAIL #####\n"
msg << " # " + assertion.to_s
msg = ANSICode.magenta(msg)
io.puts msg
io.puts ANSICode.red("#{step}")
end
|
12
13
14
|
# File 'lib/qed/reporter/summary.rb', line 12
def (step)
io.puts ANSICode.bold("#{step}")
end
|
#report_macro(step) ⇒ Object
22
23
24
25
26
27
28
|
# File 'lib/qed/reporter/summary.rb', line 22
def report_macro(step)
txt = step.to_s.tabto(2)
txt[0,1] = "*"
io.puts txt
end
|
#report_pass(step) ⇒ Object
30
31
32
|
# File 'lib/qed/reporter/summary.rb', line 30
def report_pass(step)
end
|