diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2008-01-07 19:33:07 +0100 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2008-01-07 19:33:07 +0100 |
commit | 81ad56ff88b302919ecad0b0b11e1244d236f551 (patch) | |
tree | 655bd7c27aa27f8b23dd73ec2c45bbf1e61124d9 | |
parent | 46accb531e9988d3ce9870b52a70268e80c2f5b7 (diff) | |
download | bacon-81ad56ff88b302919ecad0b0b11e1244d236f551.tar.gz bacon-81ad56ff88b302919ecad0b0b11e1244d236f551.tar.xz bacon-81ad56ff88b302919ecad0b0b11e1244d236f551.zip |
Improve TAP output
darcs-hash:20080107183307-4fc50-8f4f10d51c6bc9603af5ae84a14a1a814f77bd79.gz
-rw-r--r-- | README | 12 | ||||
-rw-r--r-- | 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 |