Hi --

On Sun, 23 Oct 2005, Trans wrote:

> Don't know how much gulf this can take, but I sure would like as small
> a version as I can get.
>
>  paths = File.expand_path(File.dirname(__FILE__)).split('/')
>  paths.size.downto(1) do |i|
>    f = (paths.slice(0..i)+['test']).join('/')
>    $TESTDIR = File.join(f,'FIXTURE') if File.directory?(f)
>  end
>  raise unless $TESTDIR

require'file/find'
raise unless$TESTDIR=Find.find(File.dirname(__FILE__)){|f|
break File.join(f,"FIXTURE")if test(?d,f)&&/\btest$/.match(f)}


David

-- 
David A. Black
dblack / wobblini.net