[rspec-users] rcov including ruby lib

Eivind Uggedal eivindu at ifi.uio.no
Tue Sep 25 05:06:35 EDT 2007

On 9/25/07, Brandon Keepers <bkeepers at gmail.com> wrote:
> When I run spec:rcov on my continuous integration server, the rcov
> report is including many other libraries in the report, including
> some from standard lib and gems.  Has anyone else had this problem or
> have any ideas for how to limit it just to coverage of code in app/
> and lib/?

Make a custom rake task in lib/tasks (or run rcov manually) with one
or several --exclude statements:

% rcov | grep -A 1 exclude
    -x, --exclude PATTERNS           Don't generate info for files matching a
                                     pattern (comma-separated regexp list)
        --exclude-only PATTERNS      Skip info only for files matching the
                                     given patterns.

Here's an example of such a rake task from my latest project:

Eivind Uggedal
Faculty of Social Science,
MSc Computer Science,
University of Oslo

More information about the rspec-users mailing list