lib/turn/reporters/dot_reporter.rb in turn-0.8.3 vs lib/turn/reporters/dot_reporter.rb in turn-0.9.0
- old
+ new
@@ -17,21 +17,25 @@
def start_test(test)
end
def pass(message=nil)
- io.print Colorize.pass('.'); io.flush
+ io.print Colorize.pass('S'); io.flush
end
- def fail(message=nil)
+ def fail(assertion, message=nil)
io.print Colorize.fail('F'); io.flush
end
- def error(message=nil)
+ def error(exception, message=nil)
io.print Colorize.error('E'); io.flush
end
+ def skip(exception, message=nil)
+ io.print Colorize.skip('-'); io.flush
+ end
+
def finish_test(test)
end
def finish_case(kase)
end
@@ -51,17 +55,14 @@
end
unless list.empty? # or verbose?
#report << "\n\n-- Failures and Errors --\n\n"
list.uniq.each do |testunit|
- message = testunit.fail? ? ' ' + FAIL : ERROR
- message = message + ' ' + testunit.message.tabto(0)
- backtrace = filter_backtrace(testunit.backtrace)
- message << "\n" + (backtrace.shift || '')
- if @trace
- message << "\n" + backtrace.join("\n")
- end
- report << "\n" << message << "\n"
+ message = []
+ message << (testunit.fail? ? FAIL : ERROR)
+ message << testunit.message.tabto(2)
+ message << clean_backtrace(testunit.backtrace).join("\n").tabto(2)
+ report << "\n" << message.join("\n") << "\n"
end
report << "\n"
end
io.puts report