Class: Quarry::Reporter::Verbatim
Overview
Constant Summary
ANSICode
Instance Attribute Summary
#error, #fail, #pass, #steps
Instance Method Summary
collapse
#initialize, #report_end, #report_intro, #report_start, #report_step, #report_summary
Instance Method Details
29
30
31
32
|
# File 'lib/quarry/reporter/verbatim.rb', line 29
def (step)
puts step
end
|
#report_error(step, error) ⇒ Object
59
60
61
62
63
64
65
66
67
68
69
70
|
# File 'lib/quarry/reporter/verbatim.rb', line 59
def report_error(step, error)
raise error if $DEBUG
tab = step.tab puts ANSICode.red("#{step}")
puts
msg = []
msg << ANSICode.bold(ANSICode.red("ERROR: ")) + error.to_str.sub(/for Quarry::Context.*?$/,'')
msg << ANSICode.bold(error.backtrace[0].chomp(":in \`run'"))
puts msg.join("\n").tabto(tab||2)
end
|
#report_fail(step, error) ⇒ Object
48
49
50
51
52
53
54
55
56
57
|
# File 'lib/quarry/reporter/verbatim.rb', line 48
def report_fail(step, error)
tab = step.tab puts ANSICode.red("#{step}")
puts
msg = []
msg << ANSICode.bold(ANSICode.red("FAIL: ")) + error.to_str
msg << ANSICode.bold(error.backtrace[0].chomp(":in \`run'"))
puts msg.join("\n").tabto(tab||2)
end
|
def report_step(step)
super
if step.code
else
end
end
24
25
26
27
|
# File 'lib/quarry/reporter/verbatim.rb', line 24
def (step)
puts ANSICode.bold("#{step}")
end
|
#report_macro(step) ⇒ Object
35
36
37
38
39
40
|
# File 'lib/quarry/reporter/verbatim.rb', line 35
def report_macro(step)
puts ANSICode.magenta("#{step}")
end
|
#report_pass(step) ⇒ Object
43
44
45
46
|
# File 'lib/quarry/reporter/verbatim.rb', line 43
def report_pass(step)
puts ANSICode.green("#{step}")
end
|
#report_step_end(step) ⇒ Object
72
73
74
|
# File 'lib/quarry/reporter/verbatim.rb', line 72
def report_step_end(step)
puts
end
|