The Decider said over 3 years ago permalink Comment? (0)
Tagged: testing shoulda

Run individual shoulda tests

When you run tests of just one model or controller you usually do something like:

ruby test/unit/evaluation_test.rb

If you want to target just one test you can use the -n option

ruby test/unit/evaluation_test.rb -n test_return_pending_evaluatees_from_composite_group

For shoulda users if you want to target just one test the -n option can also take regular expressions.

ruby test/unit/evaluation_test.rb -v -n "/have many/"

The -v lists the test name before every test, aka verbose mode.

Comments

simple_captcha.jpg
Are you a Human? Type the code above.