I use this: $: << File.expand_path(File.dirname(__FILE__))
For exactly that problem ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of jim_matt Sent: 26 June 2007 06:41 AM To: [email protected] Subject: [Wtr-general] Problems with Test::Unit in Eclipse I realize this is more of an Eclipse problem than a Watir problem, but I know some of you use Eclipse and I though maybe you have figured out the solution already. The problem is that I could not get Test Unit Runner in Eclipse to work for my Ruby tests. It appears the problem is that the directory where my test files reside in my project is not in the loadpath. Whenever I tried to run the tests with the TU runner in Eclipse, it gave me a load error, saying that it could not find the file I was trying to run. I looked all over trying to find how to add a path to the Eclipse load path, but had no success. I tried Googling Eclipse and Ruby and Test Unit and did not turn up anything. I did get it to work with a real kluge. I put a file, in the existing loadpath, with the same name as the file I was trying to run. The file contains a require statement with the full path to the file I want to run. This works for now, but I would like to have a better solution than putting a new file for each project in the existing load path. Does anybody know how to add the the loadpath or come up with a better soultion? Jim Matthews ************************************************************************************************************************** Everything in this e-mail and attachments relating to the official business of MultiChoice Africa is proprietary to the company. Any view or opinion expressed in this message may be the view of the individual and should not automatically be ascribed to the company. If you are not the intended recipient, you may not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify the sender immediately by email, facsimile or telephone and destroy the original message. **************************************************************************************************************************
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
