Class: Quarry::Spec::Reporter::Verbatim
- Inherits:
-
Quarry::Spec::Reporter
- Object
- Quarry::Spec::Reporter
- Quarry::Spec::Reporter::Verbatim
- Defined in:
- lib/quarry/spec/reporter/verbatim.rb
Overview
Verbatim Reporter
Constant Summary
Constants inherited from Quarry::Spec::Reporter
Instance Attribute Summary
Attributes inherited from Quarry::Spec::Reporter
Instance Method Summary collapse
- #report_comment(step) ⇒ Object
- #report_error(step, exception) ⇒ Object
- #report_fail(step, assertion) ⇒ Object
-
#report_header(step) ⇒ Object
def report_step(step) super if step.code #str = “(%s) %s” % [count.join(‘.’), str.tab(6).strip] #puts “* #stepstep.textstep.text.tab(2)step.text.tab(2).strip” #puts #puts step.text #puts else #puts “#stepstep.textn” # TODO: This never happens.
- #report_macro(step) ⇒ Object
- #report_pass(step) ⇒ Object
Methods inherited from Quarry::Spec::Reporter
#initialize, #report_end, #report_intro, #report_mode, #report_start, #report_step, #report_summary
Constructor Details
This class inherits a constructor from Quarry::Spec::Reporter
Instance Method Details
#report_comment(step) ⇒ Object
31 32 33 34 |
# File 'lib/quarry/spec/reporter/verbatim.rb', line 31 def report_comment(step) puts step.text puts end |
#report_error(step, exception) ⇒ Object
60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/quarry/spec/reporter/verbatim.rb', line 60 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 puts ANSICode.red("#{step.code}") puts end |
#report_fail(step, assertion) ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/quarry/spec/reporter/verbatim.rb', line 48 def report_fail(step, assertion) msg = '' msg << "##### FAIL #####\n" msg << assertion.to_s + "\n" msg << assertion.backtrace[2] msg = ANSICode.magenta(msg) puts msg puts puts ANSICode.red("#{step.code}") puts end |
#report_header(step) ⇒ Object
def report_step(step)
super
if step.code
#str = "(%s) %s" % [count.join('.'), str.tab(6).strip]
#puts "* #{step.text.tab(2).strip}"
#puts
#puts step.text
#puts
else
#puts "#{step.text}\n" # TODO: This never happens.
end
end
26 27 28 29 |
# File 'lib/quarry/spec/reporter/verbatim.rb', line 26 def report_header(step) puts ANSICode.bold(step.text) puts end |