From: brabuhr@... Date: 2008-01-25T08:24:04+09:00 Subject: Re: Scripts run using load in "for" loop run out of order On Jan 24, 2008 6:06 PM, wrote: > But, sorry that this doesn't yet work around not knowing the class > names just the file names. Maybe: require 'test/unit/ui/console/testrunner' # global array to hold the test classes as they are loaded $tests = [] # monkey patch to record the new subclasses as they are loaded class Test::Unit::TestCase def self.inherited(subclass) $tests << subclass end end # load all the files %w{ Tests/D-test.rb Tests/C-test.rb Tests/A-test.rb Tests/B-test.rb }.each do |tfile| require tfile end # run the test classes in the order they were loaded $tests.each do |tclass| Test::Unit::UI::Console::TestRunner.run(tclass) end