From: Johan Nilsson Date: 2005-01-20T16:26:00+09:00 Subject: Re: Writing test cases/suites "Nathaniel Talbott" wrote in message news:160E114C-6A1F-11D9-8A83-000A95CD7A8E@talbott.ws... > On Jan 19, 2005, at 04:06, Johan Nilsson wrote: > >> The class CountingClient should then only be accessible within the >> current ..rb file and take precedence over previous definitions. But no >> such beast is available - right? > > I usually just nest such helpers within the test class, like so: > > class T < Test::Unit::TestCase > class Helper > ... > end > > ... > end > > That way the helper is only (directly) visible to the test it's being used > by. Will that work for you? Yes, of course, I wasn't even aware that Ruby supported nested classes (still learning). As Class is a kind of Module I should have thought about it though. I'd still prefer the 'anonymous' module, but this will work. Thanks! // Johan