Re: Running one test with test/unit



Christian Neukirchen wrote:
Chris Roos <chris@xxxxxxxxxxxx> writes:


Hi,

As per this page[1], it is possible to run one test from a testcase by
using..

# ruby [programfile] -n [testmethod]

I'm probably missing something obvious but I really don't know why it
works.  Can anyone shed some light?


test/unit simply parses ARGV.

#604<2|>lilith:~/projects/rightyear# ruby test_rightyear.rb --help
Test::Unit automatic runner.
Usage: test_rightyear.rb [options] [-- untouched arguments]
...
    -n, --name=NAME                  Runs tests matching NAME.
                                     (patterns may be used).
...



Indeed I was missing something obvious. Thanks for the pointer.

Chris



.