class Test::Reporters::Dotprogress
Simple Dot-Progress Reporter
Public Instance Methods
end_suite(suite)
click to toggle source
# File lib/rubytest/format/dotprogress.rb, line 32 def end_suite(suite) puts; puts puts timestamp puts if runner.verbose? unless record[:omit].empty? puts "SKIPPED\n\n" record[:skip].each do |test, reason| puts " #{test}".ansi(:bold) puts " #{reason}" if String===reason puts end end end unless record[:todo].empty? puts "PENDING\n\n" record[:todo].each do |test, exception| puts " #{test}".ansi(:bold) unless test.to_s.empty? puts " #{exception}" puts " #{file_and_line(exception)}" puts code(exception) puts end end unless record[:fail].empty? puts "FAILURES\n\n" record[:fail].each do |test_unit, exception| puts " #{test_unit}".ansi(:bold) puts " #{exception}" puts " #{file_and_line(exception)}" puts code(exception) puts " " + clean_backtrace(exception).join("\n ") puts end end unless record[:error].empty? puts "ERRORS\n\n" record[:error].each do |test_unit, exception| puts " #{test_unit}".ansi(:bold) puts " #{exception}" puts " #{file_and_line(exception)}" puts code(exception) puts " " + clean_backtrace(exception).join("\n ") puts end end puts tally end
error(unit, exception)
click to toggle source
# File lib/rubytest/format/dotprogress.rb, line 22 def error(unit, exception) print "E".ansi(:red, :bold) $stdout.flush end
fail(unit, exception)
click to toggle source
# File lib/rubytest/format/dotprogress.rb, line 17 def fail(unit, exception) print "F".ansi(:red) $stdout.flush end
pass(unit)
click to toggle source
# File lib/rubytest/format/dotprogress.rb, line 12 def pass(unit) print "." $stdout.flush end
skip_test(unit, reason)
click to toggle source
# File lib/rubytest/format/dotprogress.rb, line 8 def skip_test(unit, reason) print "S".ansi(:cyan) if runner.verbose? end
todo(unit, exception)
click to toggle source
# File lib/rubytest/format/dotprogress.rb, line 27 def todo(unit, exception) print "P".ansi(:yellow) $stdout.flush end