Running a specific test in a suite from the command-line

  • Thread starter David Heinemeier Hansson
  • Start date
D

David Heinemeier Hansson

I remember being able to write "ruby my_test_suite.rb
test_something_good" with Ruby 1.8.0 and then Test::Unit would run just
test_something_good from the suite. This doesn't seem to work anymore
with the version in Ruby 1.8.1.

Was this taken out for a specific reason or am I missing something?
 
D

David Heinemeier Hansson

Was this taken out for a specific reason or am I missing something?

My bad. I should have looked at the code instead of just the
documentation. It seems Nathaniel has improved, not removed, the
options for selective test running.

--pattern=PATTERN "Match files to collect against PATTERN."
-n, --name=NAME "Runs tests matching NAME (patterns may be
used)."
-t, --testcase=TESTCASE "Runs tests in TestCases matching TESTCASE."

Very nice indeed! Perhaps the command-line options could be described
in the otherwise excellent introduction in the rdoc?
 
N

Nathaniel Talbott

My bad. I should have looked at the code instead of just the
documentation. It seems Nathaniel has improved, not removed, the
options for selective test running.

--pattern=PATTERN "Match files to collect against PATTERN."
-n, --name=NAME "Runs tests matching NAME (patterns may be
used)."
-t, --testcase=TESTCASE "Runs tests in TestCases matching TESTCASE."

Very nice indeed! Perhaps the command-line options could be described
in the otherwise excellent introduction in the rdoc?

That's a good idea... until then, --help provides quite comprehensive
documentation of the command-line options (thanks to optparse!).


Nathaniel

<:((><
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,141
Messages
2,570,818
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top