From: Richard Date: 2006-12-07T12:45:07+09:00 Subject: Re: Why does a test fail when I predicted it's exception class? Hi Robm, Thanks for adding your views to this discussion. > Why do you want to number your tests? Your tests should be written in > such a way that they don't depend upon the order they run, so > numbering them to try and get a specific order is a bad idea. If its > just to get a nice output when you run the suite, you should look at > tweaking the test runner or autotest or whatever you use to run your > tests. I like the numbering so that when I start to develop a slew of tests for a real app and get a failure(s), I can quickly locate the offending test in cases where the app is right and the test needs to be corrected. Maybe when I get some real experience in Test Driven Development I'll find that's not as helpful as I anticipate it to be. I don't do it to get the tests to run in any particular order. > > def teardown > > @instance1 = nil > > @instance2 = nil > > You don't need to set these to nil, as a new instance of the test > class will be create for each test case. You normally only see > teardown used for things like closing a database connection, making > sure a stubbed method gets removed, etc. OK. Again, thanks for responding Best wishes, Richard