lib/dfect/auto.rb in dfect-1.1.0 vs lib/dfect/auto.rb in dfect-2.0.0
- old
+ new
@@ -1,13 +1,9 @@
# Provides painless, automatic configuration of Dfect.
#
# Simply require() this file and Dfect will be available for use anywhere
# in your program and will execute all tests before your program exits.
-#--
-# Copyright protects this work.
-# See LICENSE file for details.
-#++
require 'dfect'
class Object
include Dfect
@@ -15,10 +11,10 @@
at_exit do
Dfect.run
# reflect number of failures in exit status
- stats = Dfect.report[:statistics]
- fails = stats[:failed_assertions] + stats[:uncaught_exceptions]
+ stats = Dfect.report[:stats]
+ fails = stats[:fail] + stats[:error]
exit [fails, 255].min
end