On Sat, 28 Feb 2004 22:58:17 +0900, David Garamond wrote:

> I'd like to get suggestions on how to use Test::Unit to fulfill the 
> following requirement simply and elegantly:
> 
[snip] 
> 1) normal level,
> 2) diagnostic level,
> 3) same as #2, but more verbose and rigorous. 

May I suggest that you have 3 files which does test_all, but with the
above levels of debugging enabled. 

My test_all file does verbose integrity checks.. but doesn't output
anything. Its better to do too many tests than too few, watch out having 3
levels of tests.

Though I usually have 2 levels of console-output.. verbose and normal

# FILE='common.rb'
class TestCase < Test::Unit::TestCase
  def self.run
    require 'test/unit/ui/console/testrunner'
    Test::Unit::UI::Console::TestRunner.run(self, Test::Unit::UI::VERBOSE)
  end
end

# FILE='test_helloworld.rb'
require 'common'
class TestScanner < Common::TestCase
  def test_hello1
  end
end
TestScanner.run if $0 == __FILE__


So that when I invoke the 'test_helloworld.rb' I get verbose output.
When I invoke 'test_all' I get normal output

--
Simon Strandgaard