On Sat, 29 Jan 2005 20:41:31 -0500, Nathaniel Talbott
<ntalbott / gmail.com> wrote:
> On Thu, 27 Jan 2005 17:17:14 -0500, Nathaniel Talbott
> <ntalbott / gmail.com> wrote:
> 
> > As for fixing the dir collector so that it respects the $LOAD_PATH,
> > I'm not happy with the robustness of the solutions I've found so far.
> 
> Attached is a new version of the patch that seems to resolve this
> issue completely, but it's so simple I'm thinking there has to be a
> gotcha.

Sure enough, there's a gotcha. The version that modifies $LOAD_PATH
allows tests to load supporting files directly from the directory the
test is in. For instance, this change breaks running the Ruby test
suite, because test_drb.rb can't find drbtest.rb. While I can see the
utility of being able to do this, I'm still not liking modifying
$LOAD_PATH.

Long term, I think the solution to this may be a way to declare test
helpers, like so:

  class TestDRb < Test::Unit::TestCase
    helper "drbtest"
    ...
  end

Which would do what's necessary to load the helper out of the local directory.

Short term, however, I think I'll just have it keep modifying the
$LOAD_PATH, but instead of restoring it verbatim, have it do its best
to delete the path that was added. This may produce some
head-scratching for some corner-cases, but such is life.

Unless someone else has a better idea? (I kind've feel like I'm
talking to myself here :-/)

Thanks,


-- 
Nathaniel

<:((><
Terralien, Inc.