Rcov is a handy tool to make sure that your tests have at least run every line of code in your application. This is very useful if you have forgotten to write a test for a method, or if inside of a method, you forgot to test a conditional statement. Because I find this handy, I incorporate the rcov plugin in my rails applications.
rake test:functionals:rcov, my report shows me a long list of items, some of which I don’t want to see. I don’t want to see the coverage of my models in the report. I should get that report by running
rake test:units:rcov. Luckily, the plugin allows for me to set arguments like
SHOW_ONLY="app/models". But get this, I’m lazy and I don’t want to type that argument let alone remember it every time I want to run the rcov tests. What to do?