Testing the Health of a Rails App
By: Johnathon Wright on: October 27, 2022
When I start a new project, I want to know what areas are going to be problems -- what's the overall health of the app? Here are some searches that generally help me to determine this.
rake stats
0 to 30% test coverage -- not even trying 30% to 70% -- oof 70% to 120% -- ok to very good 120% + -- amazing / possibly excessive. :)
grep rescue app/controllers
This is a bad sign
grep rescue app/models
can be ok but can be a bad sign. More than 0.5 per model certainly problematic. That said, I have seen arguments that you should raise an error if someone passes in something problematic and then you might need to rescue and I can live with that.
grep sleep app/
Hopefully you don't see any results...