As of rcov 0.5.0.1: code coverage for Ruby, coverage in Rails 1.1.2 can be configured with only one rake file as seen on Peter Fitzgibbons
blog.
——
Agile Web Development with Rails recommends rcoverage for generating coverage reports on your unit tests, but @rcoverage@’s README recommends a switch to rcov.
For rcov installation instructions (via the Ruby Production Archive (RPA)) see Ruby On Rails Test Coverage in Alex Pooley’s blog.
Test coverage with rcov and rake and 100% test coverage with rcov
on the asplake blog shows how to automate coverage report generation with rake (see WhatIsRakeAndWhatDoesItDo).
——
The rcov available at http://eigenclass.org/hiki.rb?rcov is much faster than the rcov available from RPA. Also, the RPA rcov seems to fail on functional tests that invoke partial views.
——
The rcov from eigenclass.org is now available as a gem, so these days it’s as easy as “gem install rcov”.