Sha256: 535275ec85d3f1d2cb70e736158d327dcc32f4967b7f4964b2ac440adedd9074
Contents?: true
Size: 1.57 KB
Versions: 1
Compression:
Stored size: 1.57 KB
Contents
module QED module Reporter #:nodoc: require 'qed/reporter/abstract' # = Bullet Point Reporter # # Similar to the Verbose reporter, but does # not display test code for passing tests. class BulletPoint < Abstract # def text(step) case step.text when /^\=/ io.print "#{step.text}".ansi(:bold) else txt = step.text.to_s.strip.tabto(2) txt[0,1] = "*" io.puts txt io.puts end end def pass(step) #io.puts "#{step}".ansi(:green) end def fail(step, assertion) msg = '' msg << " ##### FAIL #####\n" msg << " # " + assertion.to_s msg = msg.ansi(:magenta) io.puts msg io.print "#{step.text}".ansi(:red) end def error(step, exception) raise exception if $DEBUG msg = '' msg << " ##### ERROR #####\n" msg << " # " + exception.to_s + "\n" msg << " # " + clean_backtrace(exception.backtrace[0]) msg = msg.ansi(:magenta) io.puts msg io.print "#{step.text}".ansi(:red) end #def report(str) # count[-1] += 1 unless count.empty? # str = str.chomp('.') + '.' # str = count.join('.') + ' ' + str # io.puts str.strip #end #def report_comment(step) # txt = step.to_s.strip.tabto(2) # txt[0,1] = "*" # io.puts txt # io.puts #end #def report_macro(step) # txt = step.to_s.tabto(2) # txt[0,1] = "*" # io.puts txt # #io.puts # #io.puts "#{step}".ansi(:magenta) #end end #class Summary end#module Reporter end#module QED
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
qed-2.2.2 | lib/qed/reporter/bullet.rb |