diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2008-08-17 13:32:40 +0200 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2008-08-17 13:32:40 +0200 |
commit | 4416e794240928f23a7f65f55d436c5633a0bb1d (patch) | |
tree | 79ac940d53e9343701d141f41694b585fcfc9d6b /lib | |
parent | 4eba68f6a3b1c905acb5162d6d5a56efd7b3cc86 (diff) | |
download | bacon-4416e794240928f23a7f65f55d436c5633a0bb1d.tar.gz bacon-4416e794240928f23a7f65f55d436c5633a0bb1d.tar.xz bacon-4416e794240928f23a7f65f55d436c5633a0bb1d.zip |
Add option to disable backtraces
darcs-hash:20080817113240-4fc50-3162b572aebb4183f9482d99ad58b2f98b972076.gz
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bacon.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/bacon.rb b/lib/bacon.rb index 86b699d..b34a9f2 100644 --- a/lib/bacon.rb +++ b/lib/bacon.rb @@ -19,6 +19,8 @@ module Bacon RestrictName = // unless defined? RestrictName RestrictContext = // unless defined? RestrictContext + Backtraces = true unless defined? Backtraces + def self.summary_on_exit return if Counter[:installed_summary] > 0 at_exit { @@ -47,7 +49,7 @@ module Bacon end def handle_summary - print ErrorLog + print ErrorLog if Backtraces puts "%d specifications (%d requirements), %d failures, %d errors" % Counter.values_at(:specifications, :requirements, :failed, :errors) end @@ -66,7 +68,8 @@ module Bacon end def handle_summary - puts "", ErrorLog + puts + puts ErrorLog if Backtraces puts "%d tests, %d assertions, %d failures, %d errors" % Counter.values_at(:specifications, :requirements, :failed, :errors) end @@ -83,7 +86,7 @@ module Bacon else puts "not ok %d - %s: %s" % [Counter[:specifications], description, error] - puts ErrorLog.strip.gsub(/^/, '# ') + puts ErrorLog.strip.gsub(/^/, '# ') if Backtraces end end |