Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to run just one test method in a test case

0 views
Skip to first unread message

nicknameoptional

unread,
Jan 24, 2006, 2:59:23 PM1/24/06
to
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

Marcel Molina Jr.

unread,
Jan 24, 2006, 3:17:03 PM1/24/06
to
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. <mar...@vernix.org>


nicknameoptional

unread,
Jan 24, 2006, 3:30:17 PM1/24/06
to
thanks. should read my rails book more carefully.

0 new messages