Ruby on Rails Code Coverage
I realized that I would need to track my progress over time and began looking for a code coverage tool for Ruby on Rails. It did not take me long to find the coverage tool. However, coverage states that they are not making any changes and that rcov is better. I checked out rcov and it is pretty sweet and easy to use.
It replaces the command line invocation you would normally use to execute your tests and outputs the results as HTML into a coverage directory in your project. It is as easy as executing
rcov test/**/*.rb
to execute all of your tests and then browse the coverage directory with your favorite browser (i.e., Firefox).
If you are in the market for a free, easy to use code coverage utility for Ruby on Rails, I suggest rcov.
To install coverage
sudo gem install coverage
To install rcov
sudo gem install rcov
More of my rantings
- Ruby on Rails Testing – login gotcha
- Ruby on Rails Resources for Newbies
- Ruby on Rails Testing – flash.now gotcha
These might also interest you
- Outsourcing Killed By Django And Ruby On Rails (Aware Labs)
- Need a Ruby on Rails Developer (Brainfuel)
- Configuring Rails To Use Gmail's SMTP Server (Preston Lee)