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
Yeah, the =true bit is counter-intuitive.
Test::Unit.run=true … and your tests won’t run
Test::Unit.run=false … and your tests will run
Weird, huh?
Counter-intuitive, because the present tense of “run” is the same as the past tense.
In fact, at the time the blog post was made, the documentation said the exact opposite of what was done.
Umm, is English your first language? The past tense of Run is Ran.
Both past tense, both correct:
1) He ran (simple past tense)
2) He had run (past perfect tense)
Dreamr, welcome to the English language. It’s tough, but it gets easier