Sha256: 0650076f83b3e4950d4ac20cc1ebddc192d2a6577a3ae3074d2f34496aacd63c
Contents?: true
Size: 1.47 KB
Versions: 1
Compression:
Stored size: 1.47 KB
Contents
require 'quarry/reporter' module Quarry class Reporter #:nodoc: # = Summary Reporter # # Similar to the Verbatim reporter, but does # not display test code for passing tests. class Summary < Reporter def report_header(step) puts ANSICode.bold("#{step}") end def report_comment(step) txt = step.to_s.tabto(2) txt[0,1] = "*" puts txt end def report_macro(step) txt = step.to_s.tabto(2) txt[0,1] = "*" puts txt #puts #puts ANSICode.magenta("#{step}") end def report_pass(step) #puts ANSICode.green("#{step}") end def report_fail(step, assertion) msg = '' msg << " ##### FAIL #####\n" msg << " # " + assertion.to_s msg = ANSICode.magenta(msg) puts msg #puts puts ANSICode.red("#{step}") end 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}") end #def report(str) # count[-1] += 1 unless count.empty? # str = str.chomp('.') + '.' # str = count.join('.') + ' ' + str # puts str.strip #end end #class Summary end #class Reporter end #module Quarry
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
quarry-0.5.2 | lib/quarry/reporter/summary.rb |