Waiting for exeution to end

I have a snippet of code like this:

class TestSuite < Watir::TestCase
  File.open(ARGV[0]||'testlist.txt').each_line do |entry|
     if entry[0] == "#"
       pass
     else
       code = lambda{load "#{entry.strip}.rb" }
       self.send(:define_method, entry.strip, code)#{load
"#{entry.strip}.rb" }#puts "#{entry.strip}"
      #self.send(:public, entry.strip.to_sym )
     end
  end
end

if $0 == __FILE__
  require 'test/unit/ui/console/testrunner'
  Test::Unit::UI::Console::TestRunner.run(TestSuite)
end

which basically is a harness to run a load of tests using WATIR. I've
written some reporting tools, using a class called Grapher. What I'd
like to happen, is the test suite runs, then the grapher performs its
task. However, if I place the call to grapher after the line
Test::Unit::UI::Console::TestRunner.run(TestSuite), it executes before
the tests have completed execution.

I'm looking for an elegant solution to this - should I spawn a process
or something?

···

--
Posted via http://www.ruby-forum.com/.

is there a way to use yield here around the execute line?

···

--
Posted via http://www.ruby-forum.com/.