From: Trans Date: 2008-04-22T21:46:04+09:00 Subject: Re: How can I organize my project in the best way? On Apr 22, 7:55 am, Christoffer Lernö wrote: > > Hi Christoffer, > > > When testing your lib you should only need to add lib/ to the load > > path once. For instance you might do: > > > ruby -Ilib test/sometest.rb > > Yes, but if the test is in > > test/client/tc_connect.rb > > then I might need to require > > test/test_common.rb You can add test/ to the load path as well if you need too. > lib/client/connect.rb This should always be: require 'client/connect' > Again I need to add these libs differently depending on where I start > my test. Easiest is to always start from your projects root. Using Rake, for instance, makes that automatic. But as an example of manually running a test from within the test location: $ cd test/client $ ruby -I../../lib;../../test tc_connect.rb T.