Hi...

I have some tests in directories that share common code like

suite_foo/
     test_1.rb
     test_2.rb
suite_bar/
     test_3.rb
     test_4.rb
common/
     my_library.rb

My test runner script dips into each directory and then back out:

##############################################
TOPDIR = File.join(File.dirname(__FILE__), '..')
$LOAD_PATH.unshift TOPDIR
require 'test/unit'

test_dirs = Dir.glob("suite*")
test_dirs.each do |dir|
Dir.chdir(dir)

test_cases = Dir.glob("*rb")

test_cases.each {|f| require f }

Dir.chdir("..")

end #do
###########################################################

is this a reasonable approach?  It seems kinda thrashy to me, I wonder
if there's a better way to go about this.

-Chris

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

Reply via email to