Ruby unit testing – run only one test
5 December, 2006
If you don’t wish to run all the unit tests in your test case you can tell ruby to run only one by passing in the name of the test:
ruby test_mytestcase.rb --name test_just_this_method
Hello justin!
I’m new to this testing in ruby, can u plz tell me how to apply more than one test case at a time.Plz explain me with an example.
Kumaran, you can do this by putting a –name (or -n) in front of each test name:
ruby test_mytestcase.rb -n test_1 -n test_2
Hope that helps,
-Matt
Note that each test must begin with the word test_xxx for it to run it.
Perfect was curious on how to properly test.