From: Fa Sidd Date: 2008-01-25T10:04:22+09:00 Subject: Re: Scripts run using load in "for" loop run out of order unknown wrote: > On Jan 24, 2008 6:06 PM, wrote: > > # 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 This worked! Not sure if replacing "load(testList[i])" with "`ruby #{testList[i]}`" would have worked. I have global variables that I need to worry about Thanks for the help everyone Thanks. -- Posted via http://www.ruby-forum.com/.