From: Bret Pettichord Date: 2004-06-10T15:49:40+09:00 Subject: Re: Taming Test::Unit >There are several ways, none of them satisfactory. First of all, as Joel >already mentioned, lazy initialize the resource and stuff it in a class >variable (he problematic thing becomes disconnecting it when you're done - >I don't have a good solution for this). What about putting the teardown in an END block? >Another way is to build your suites manually, and override TestSuite#run >to call suite-level setup and teardown methods. I like this suggestion. It might be nice to do this automatically in future versions of test-unit. >[ P.S. Test::Unit won't touch any command-line arguments after a '--' in >the list, so you should be able to just read the hostname and port out of >the ARGV array. ] Another approach is to do this: # ARGV need to be deleted to enable the Test::Unit functionatily that grabs # the remaining ARGV as a filter on what tests to run $HIDE_IE = ARGV.include?('-b'); ARGV.delete('-b') ______________________________________ Bret Pettichord, Software Tester Consultant - www.pettichord.com Author - www.testinglessons.com Blogger - www.io.com/~wazmo/blog Scripting Web Tests Tutorial XP/Agile Universe, Aug 15, Calgary www.pettichord.com/training.html