Is there an easy ruby or rails command to get a list of all the tests in an application? I use Shoulda primarily, but if there’s a ruby solution regardless of test suite that would work too.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I have found a roundabout solution: the test_benchmarker plugin. You run your tests with an extra environment variable like so:
You’re best off piping the output to a file, because it will be long. But it will give you a list of all the test classes and tests themselves, for both unit and functional. Obviously it gives you the benchmarking results too, which is a bonus.
Is there anything better? I guess this is pretty close, and the extra effort is so little, why NOT get the benchmark results too? RSpec has this feature built in, but maybe it’d be fun to write a version for Test::Unit.