how to run just one test method in a test case

N

nicknameoptional

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
 
M

Marcel Molina Jr.

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
 

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

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top