--Apple-Mail-27-48306485 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed On 31 Jan 2005, at 10:46, Nathaniel Talbott wrote: > On Sat, 29 Jan 2005 20:41:31 -0500, Nathaniel Talbott > <ntalbott / gmail.com> wrote: > > 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 Or make sure that -I is set correctly... > 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. I think this one is reasonably safe (delete what test/unit added), because you should expect weird stuff if you play with $LOAD_PATH enough to destroy it. > Unless someone else has a better idea? (I kind've feel like I'm > talking to myself here :-/) This was the same conclusion I came to. Rails seems to work fine with this kind of patch... -- Eric Hodel - drbrain / segment7.net - http://segment7.net FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04 --Apple-Mail-27-48306485 content-type: application/pgp-signature; x-mac-type=70674453; name P.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin) iD8DBQFB/pmuMypVHHlsnwQRAnctAKDfYmbmdXSj/Z1JBOD1IIThvh+7mgCdEXLg JqZdEq5ooSLsQQwj2WVPL8YK -----END PGP SIGNATURE----- --Apple-Mail-27-48306485--