Ruby’s Test::Unit has a very cool feature… you can quickly build test suites by having a file which ‘requires’ all the test case files. Running the file will find all the test cases, and run them all. Very useful. Unless you want to have access to all the test cases, but don’t want to run them – eg: when you want to count how many test cases you have of each type. To do that, make sure the top two lines of your test suite file are:
require "test/unit" Test::Unit.run=true
=true bit is counter-intuitive.
Test::Unit.run=true … and your tests won’t run
Test::Unit.run=false … and your tests will run