From: Caleb Clausen Date: 2009-08-09T06:10:09+09:00 Subject: Re: is this a unit/test bug? On 8/8/09, Roger Pack wrote: > C:\dev\ruby\ties>ruby > C:\dev\ruby\ties\test\functional\store_controller_test.rb > -ntest_gives_single_discount > > # this one works ^^^^^^ > > # this one fails vvvvvv > > C:\dev\ruby\ties>ruby > C:\dev\ruby\ties\test\functional\store_controller_test.rb > --testcase=test_gives_single_discount > C:/dev/ruby/ties/test/functional/../test_helper > Loaded suite C:/dev/ruby/ties/test/functional/store_controller_test > Started > > Finished in 0.0 seconds. > > 0 tests, 0 assertions, 0 failures, 0 errors > > but --testcase is supposed to be a test pattern...anybody know what's > going on here? I'm thinking this is a bug. As far as I know, the -n (or --name) parameter to test/unit gives the name of a test method (or methods) to be run. The -t (or --testcase) parameter gives the name of a test class. So, it looks like the second command didn't do what you want because there's no class named test_gives_single_discount. PS: if you want to use a pattern (regex) in names used by -n and -t, I think you have to enclose the name in slashes. (eg: -n /test_gives_single_discount/ )