summary refs log tree commit diff
path: root/lib/bacon.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bacon.rb')
-rw-r--r--lib/bacon.rb17
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