Sha256: a1cfda01cff9597b780468c8deee46df3bfcb6a80955ee25a66ec343327c08ba
Contents?: true
Size: 1.48 KB
Versions: 2
Compression:
Stored size: 1.48 KB
Contents
module QED module Reporter #:nodoc: require 'qed/reporter/base' # = DotProgress Reporter # class DotProgress < BaseClass # def report_intro @start_time = Time.now io.puts "Started" end # def report_step(step) super #if step.code io.print "." #str = "(%s) %s" % [count.join('.'), str.tab(6).strip] #puts "* #{step.text.tab(2).strip}" #puts "\n#{step.code}\n" if $VERBOSE #else #puts "\n#{step.text}" #end end #def report(str) # count[-1] += 1 unless count.empty? # str = str.chomp('.') + '.' # str = count.join('.') + ' ' + str # puts str.strip #end def report_summary io.puts "\nFinished in #{Time.now - @start_time} seconds.\n\n" @error.each do |step, exception| io.puts ANSICode.red("***** ERROR *****") io.puts "#{exception}" io.puts ":#{exception.backtrace[0]}:" #io.puts ":#{exception.backtrace[1]}:" #io.puts exception.backtrace[1..-1] if $VERBOSE io.puts end @fail.each do |step, assertion| io.puts ANSICode.red("***** FAIL *****") io.puts ANSICode.bold("#{assertion}") io.puts ":#{assertion.backtrace[2]}:" #io.puts assertion if $VERBOSE io.puts end io.puts "%s specs, %s steps, %s failures, %s errors" % [@specs, @steps, @fail.size, @error.size] #, @pass.size ] end end#class DotProgress end#module Reporter end#module QED
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
qed-1.1.0 | lib/qed/reporter/dotprogress.rb |
qed-1.0.0 | lib/qed/reporter/dotprogress.rb |