> Actually, the best way to do this is to put test root in your load path.
>
>   $LOAD_PATH << File.dirname(__FILE__) + '/../'
>   require 'lib/variables'
>
> The problem with Keith's solution is that you'll end up requiring the same
> file from different tests via different paths. The semantics of require is
> that it won't load a library if it has already been loaded, but if you are
> loading the same file but using a different path in your require statement,
> require will think it is a different library and load it again. If it has
> constants you will get warnings about redefining constants.

Ok. What you said makes sense, but I'm not entirely clear where I'd
put the $LOAD_PATH and requrie lines. Would those just go at the top
of all my tests?

Thanks,
--
Michael Moore
-------------------------------
www.stuporglue.org -- Donate your used computer to a student that needs it.
www.ubuntu-utah.org -- In Utah? Interested in Ubuntu? Come join us.

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to