Hi,
I have an app/gem dir structure looking like this:
appname (dir)
Rakefile
lib (dir)
appname.rb
appname (dir)
class1.rb
class2.rb
t (dir)
class1.t
class2.t
The appname.rb handles all the requires when the app is run.
In the rakefile I've got this task, which I can run as `rake test`:
# desc "Run basic tests"
Rake::TestTask.new("test") { |t|
t.libs = [lib_dir, test_dir]
t.pattern = 't/*.t'
t.verbose = true
t.warning = true
}
I've a couple of questions. How do I require the classes so that I can run test files individually if needed - do I put the requires in the test files themselves, or perhaps the rakefile, but then what's the best method for working out the right path to the class files from wherever the test is being run?
Secondly, since the classes are all wrapped by `module appname` does that mean the tests need to be wrapped in it too?
I'd be grateful for any suggestions or pointers.
Regards,
Iain