[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

how to run just one test method in a test case

nicknameoptional

1/24/2006 7:59:00 PM

for example, I have a testcase class, which has test_1, test2, test3
.... methods. how to run just one of the test, like test_1? Thanks

2 Answers

Marcel Molina Jr.

1/24/2006 8:17:00 PM

0

On Wed, Jan 25, 2006 at 05:03:13AM +0900, nicknameoptional wrote:
> for example, I have a testcase class, which has test_1, test2, test3
> .... methods. how to run just one of the test, like test_1? Thanks

The -n option.

You can run a test by name

e.g.

ruby tc_foo.rb -n test_foo_1

or by pattern match

ruby tc_foo.rb -n /foo_2/

marcel
--
Marcel Molina Jr. <marcel@vernix.org>


nicknameoptional

1/24/2006 8:30:00 PM

0

thanks. should read my rails book more carefully.