From 81ad56ff88b302919ecad0b0b11e1244d236f551 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Mon, 7 Jan 2008 19:33:07 +0100 Subject: Improve TAP output darcs-hash:20080107183307-4fc50-8f4f10d51c6bc9603af5ae84a14a1a814f77bd79.gz --- README | 12 ++++++------ lib/bacon.rb | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README b/README index ea950bc..427f494 100644 --- a/README +++ b/README @@ -82,12 +82,12 @@ If you want shorter output, use the Test::Unit format: It also supports TAP: $ bacon -p whirlwind.rb - ok 1 # should be empty - ok 2 # should have zero size - ok 3 # should raise on trying fetch any index - ok 4 # should have an object identity - ok 5 # should be a palindrome - not ok 6 # should have super powers: FAILED + ok 1 - should be empty + ok 2 - should have zero size + ok 3 - should raise on trying fetch any index + ok 4 - should have an object identity + ok 5 - should be a palindrome + not ok 6 - should have super powers: FAILED # Bacon::Error: no super powers found # ./whirlwind.rb:39: A new array - should have super powers # ./whirlwind.rb:38 diff --git a/lib/bacon.rb b/lib/bacon.rb index dac4a16..e1b04cc 100644 --- a/lib/bacon.rb +++ b/lib/bacon.rb @@ -82,9 +82,9 @@ module Bacon ErrorLog.replace "" error = yield if error.empty? - printf "ok %-8d # %s\n" % [Counter[:specifications], description] + printf "ok %-3d - %s\n" % [Counter[:specifications], description] else - printf "not ok %-4d # %s: %s\n" % + printf "not ok %d - %s: %s\n" % [Counter[:specifications], description, error] puts ErrorLog.strip.gsub(/^/, '# ') end -- cgit 1.4.1