From: Gavin Sinclair Date: 2003-01-11T22:09:11+09:00 Subject: Re: 'require' search path On Saturday, January 11, 2003, 10:23:51 PM, Tim wrote: > I wish 'require' would count the current directory as the directory the file > is in, rather than the directory the script is being run from. My test > scripts do > require 'test/tc_default' > This works fine if you're running the test script which runs all the tests, as > it resides in the parent directory. However, if you cd into the test > directory and run a test case directly, it can't find it, since it's looking > for 'test/test/tc_default' instead, which of course doesn't exist. > [...] Hi Tim, Good points. Check out ProjectDirectoryStructure on the wiki for some tips I gathered when I asked a similar-ish question. Please suggest anything I can add to the page. Briefly, though, I found no killer way to do what you're after with running test cases, so I set my own standard procedure for running tests and stuck to it. I can't retrieve the code now, but basically I had a "test/master.rb" that ran every test. If you gave it CL arguments, it ran only these files. That was good enough for me. Restriction: my test directory was flat. Cheers, Gavin