John Carter [mailto:john.carter / tait.co.nz] wrote:

> So there I was building a wee test with testunit-0.1.4 and 
> ruby 1.6.7 when the test suite ran but ran no test cases.
> 
> Weird.
> 
> After much fiddling I worked out why.
> 
> I was doing an all-in-one-file program and test. However I 
> wanted the program to print out a help if no args were found 
> and run the test if the command line arg was "test".
> 
> Something deep and undocumented in TestRunner looks at ARGV 
> and does something with them and then doesn't run my test cases.
> 
> Sad.

Sorry... I don't usually work in the program & test in one file mode,
and so hadn't even thought about this. My general thought is that if you
do want to work in that mode, you should run your test explicitly, not
automatically. Then you can keep ARGV all to yourself. FWIW, that
'interesting' code allows you to filter out which tests are run from the
commandline.

On a semi-related and possibly helpful note, I am doing some pretty
heavy refactoring in the unit.rb area right now. This involves both
testing & documenting the stuff that's going on in there, and making it
more pluggable.

Anyhow, if you have any ideas for how to fix the issue you're having
(while keeping the feature that others are using), I'm all ears...

Thanks,


Nathaniel

<:((><
+ - -
| RoleModel Software, Inc.
| EQUIP VI