From: dblack@... Date: 2003-09-15T21:28:36+09:00 Subject: Re: Test::Unit -- multiple errors in test method ??? Hi -- On Mon, 15 Sep 2003, Johan Holmberg wrote: > Hi ! > > I have been writing some unit tests with Test::Unit. > > I've noted that when an assertion fails in a test method, the > remaining assertions in the same test method aren't even excuted. > The two last assertions aren't even executed. > Is this a but or an intentional "feature" ? Considering the state of the test/unit code, and the amount of use it gets, I think it's a pretty safe bet that something like this was implemented consciously and didn't just slip in unnoticed... :-) A failed assertion raises Test::Unit::AssertionFailedError, so you can wrap your tests in rescue clauses if you want to put them all in one method and not stop execution. But see David Corbin's response too; this probably isn't a good design, and it's actually more work and clutter than putting each test in a different method or grouping them to cascade as David showed. David -- David Alan Black home: dblack@superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav