A better method would be this:

$LOAD_PATH << '../Methods'
$LOAD_PATH << '../../WebXML/XML'
require 'FileA'
require 'xml_file'

Zeljko's approach will work, until you have a code in FileA that want to 
load FileB, and then another test that wants to load FileB. The first will 
want to do "require 'FileB'" (which won't work at first, because require is 
relative to the current directory of the script being run, not the library 
being loaded -- eventually you'll probably fix with a change to the load 
path). And yet the other file will want to do "require '../Methods/FileA'". 
In the end this will load the module twice, which often leads to other errors.

Bret

At 03:11 AM 10/19/2005, Zeljko Filipin wrote:
>Try this
>
>require '../Methods/FileA'
>require '../../WebXML/XML/xml_file'
>
>Zeljko
>
>2005/10/19, beth ferguson <[EMAIL PROTECTED]>:
> > Currently I have my test files all within the same directory, is there a
> > way that i can use multiple directories? Say i was running a test from
> > within the directory C:\Watir\Tests and I wanted to include a method
> > from FileA which is stored in the C:\Watir\Methods  directory. How do I
> > include that and how do I include  a file which is in  C:\\WebXML\XML?
> >
> > Thanks--
> >
> > Beth
> >
> >
> > _______________________________________________
> > Wtr-general mailing list
> > [email protected]
> > http://rubyforge.org/mailman/listinfo/wtr-general
> >
>
>_______________________________________________
>Wtr-general mailing list
>[email protected]
>http://rubyforge.org/mailman/listinfo/wtr-general

_____________________
  Bret Pettichord
  www.pettichord.com

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

Reply via email to