diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2008-11-30 11:00:28 +0100 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2008-11-30 11:00:28 +0100 |
commit | b473f201b54ebbe5c8cd1a59ee8571d74bf2a7ed (patch) | |
tree | c5925d209234b32d22db9a2c65a94c856da3dc78 /lib | |
parent | 8055e791eae194733fc31cc3687b9a30b8413515 (diff) | |
download | bacon-b473f201b54ebbe5c8cd1a59ee8571d74bf2a7ed.tar.gz bacon-b473f201b54ebbe5c8cd1a59ee8571d74bf2a7ed.tar.xz bacon-b473f201b54ebbe5c8cd1a59ee8571d74bf2a7ed.zip |
Add Knock output
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bacon.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/bacon.rb b/lib/bacon.rb index b9774f7..c1e1647 100644 --- a/lib/bacon.rb +++ b/lib/bacon.rb @@ -97,6 +97,23 @@ module Bacon end end + module KnockOutput + def handle_specification(name) yield end + + def handle_requirement(description) + ErrorLog.replace "" + error = yield + if error.empty? + puts "ok - %s" % [description] + else + puts "not ok - %s: %s" % [description, error] + puts ErrorLog.strip.gsub(/^/, '# ') if Backtraces + end + end + + def handle_summary; end + end + extend SpecDoxOutput # default class Error < RuntimeError |