I use rcov for a set of tests that are auto-generated from rails routes to collect information about dead code (code that is never called in the application). This setup already generates enlightening results for controllers, models, helpers, and lib code. Unfortunately, rcov does not track code coverage in erb templates, which makes sense, since erb templates are a rather complicated continuation of the normal execution concept.
The rails themselves can generate good reports about where in the template exceptions are raised and the like, so I feel that this is the data that can be collected.
I am currently trying to find points in rcov that I can connect to, but the nature of the Ouroboros system makes it difficult to see what happens clearly. I also suspect that some amount of ERB clearance will be required.
If you have ideas for approaches or solutions, I would appreciate it. Once I get the view customization, I clear this code and release it as an open-source Rails plugin.
source share