lib/ae/assertion.rb in ae-1.5.0 vs lib/ae/assertion.rb in ae-1.6.0

- old
+ new

@@ -9,10 +9,11 @@ # # This is the underlying Exception class of the whole system. # class Assertion < Exception + # TODO: This doesn't seem to cut it anymore! @count = 0 @fails = 0 class << self attr_accessor :count @@ -42,9 +43,10 @@ # Increment assertion counts. If +pass+ is true then only +@count+ # is increased. If +pass+ if false then both +@count+ and +@fails+ # are incremented. def increment(pass) + recount unless instance_variable_defined?('@count') # TODO: Come on, there has to be a better way! @count += 1 @fails += 1 unless pass end # Reset counts.