I can't see how setup and teardown would help in this case. They are  
run as before and after methods for each test, not as initializer and  
finalizer for the whole test case. Also, recall that I don't want to  
create any test objects outside of test_valid_args. I only want to  
use objects that have already been validated by this test in the  
other tests. To me, that means test_valid_args MUST run first.

However, being new to Test::Unit, I may well be missing something.  
Could you post an example showing how setup and teardown could be  
used to avoid the trap I fell into?

Regards, Morton

On Aug 30, 2006, at 6:55 AM, Tim Kuntz wrote:

>> The fix is obvious and I have already applied it: rename
>> test_valid_args to test_args so it runs first.
>
> Test::Unit provides the functionality you need in the "setup" and  
> "teardown"
> methods, which are run before and after each test_* method in your  
> class.