Permalink
Browse files

use cleanup for verifying mock.

  • Loading branch information...
1 parent 2bff6e2 commit 5c6c643da11aca3c001bd72b4836cc560737964c @kou kou committed Mar 31, 2011
Showing with 7 additions and 3 deletions.
  1. +7 −3 lib/test/unit/rr.rb
View
@@ -24,9 +24,13 @@ def setup_rr
::RR.reset
end
- teardown :after => :append
- def teardown_rr
- ::RR.verify
+ cleanup :after => :append
+ def cleanup_rr
+ begin
+ ::RR.verify
+ rescue ::RR::Errors::RRError => exception
+ add_failure(exception.message, exception.backtrace)
+ end
end
end
end

0 comments on commit 5c6c643

Please sign in to comment.