• Stars
    star
    409
  • Rank 105,709 (Top 3 %)
  • Language
    Ruby
  • License
    Other
  • Created over 15 years ago
  • Updated over 12 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The new home of RCov on GitHub

RCov - Code Coverage for Ruby

Why? What?

This is our fork of Mauricio Fernandez's RCov (maintained by [Relevance] 2).

NOTE: This fork does not work on Ruby 1.9.x. For coverage on Ruby 1.9 look at [SimpleCov] 3.

Build Status

Install

gem install rcov

Bugs and Issues

[RCov Issues on GitHub] 1

More Info

rcov copyright (c) 2004-2012 Mauricio Fernandez [email protected] rcov copyright (c) 2008-2012 Aaron Bedra and Relevance Inc.

rcov README

Rcov is a code coverage tool for Ruby. It is commonly used for viewing overall test coverage of target code. It features:

  • cross-referenced XHTML and several kinds of text reports
  • support for easy automation with Rake
  • colorblind-friendliness

Requirements

  • Ruby 1.8.6 or higher
  • (recommended) C compiler: you can also use rcov without the rcovrt extension but rcov will be two orders of magnitude slower. The extension requires Ruby 1.8.6 or higher.

Normal install

De-compress the archive and enter its top directory. Then type:

($ su)
# ruby setup.rb

This simple step installs rcov under the default location for Ruby libraries. You can also customize the installation by supplying some options to setup.rb. Try ruby setup.rb --help.

A normal (rcovrt-enabled) install requires Ruby >= 1.8.6 and a working C toolchain; if you cannot compile Ruby extensions proceed as described below.

Install without the rcovrt extension

($su )
# ruby setup.rb all --without-ext

will install rcov without building the rcovrt extension.

Usage

In the common scenario, your tests are under test/ and the target code (whose coverage you want) is in lib/. In that case, all you have to do is use rcov to run the tests (instead of testrb), and a number of XHTML files with the code coverage information will be generated, e.g.

rcov -Ilib test/*.rb

will execute all the .rb files under test/ and generate the code coverage report for the target code (i.e. for the files in lib/) under coverage/. The target code needs not be under lib/; rcov will detect is as long as it is required by the tests. rcov is smart enough to ignore "uninteresting" files: the tests themselves, files installed in Ruby's standard locations, etc. See rcov --help for the list of regexps rcov matches filenames against.

rcov can also be used from Rake; see doc/readme_for_rake or the RDoc documentation for more information. The Rakefile included in rcov's sources holds a few tasks that run rcov on itself, producing a number of reports. You can try

rake rcov

preferably after a full install or

ruby setup.rb config
ruby setup.rb setup

so that the rcovrt extension can be used to speed up the process. This will generate a cross-referenced XHTML report under coverage/.

rcov can output information in several formats, and perform different kinds of analyses in addition to plain code coverage. See rcov --help for a description of the available options.

License

rcov is licensed under the same terms as Ruby. See LICENSE.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of ePark Labs nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

More Repositories

1

labrepl

Clojure
504
star
2

tarantula

a big hairy fuzzy spider that crawls your site, wreaking havoc
Ruby
444
star
3

streamlined

Ruby
207
star
4

diametric

Diametric is a library for building schemas, queries, and transactions for Datomic from Ruby objects.
Ruby
169
star
5

org-html-slideshow

JavaScript presentation slides generated from Emacs org-mode
Clojure
160
star
6

functional-koans

A set of common ideas for learning functional programming
156
star
7

etc

bash scripts, aliases, other misc things go here
Shell
153
star
8

log_buddy

logbuddy is your friendly little log buddy by your side
Ruby
141
star
9

clojure-conj

134
star
10

edn-ruby

Ruby implementation of Extensible Data Notation as defined by Rich Hickey
Ruby
119
star
11

cap_gun

Bang! You've deployed!
Ruby
115
star
12

castronaut

CAS Server
Ruby
101
star
13

mycroft

It's your data, look at it anywhere
Clojure
66
star
14

vasco

A route-explorer for Rails
JavaScript
57
star
15

hooppps

Ruby
56
star
16

boids

Boids flocking simulator in ClojureScript (for ClojureScript training)
JavaScript
38
star
17

blue-ridge-sample-app

Sample Rails project demonstrating JavaScript testing with Blue-Ridge
JavaScript
30
star
18

how_we_work

Relevance's How We Work site
JavaScript
22
star
19

java-tdd

TDD Examples, Labs, and References
Java
19
star
20

multi_rails

Test against many versions of Rails with a single command.
Ruby
19
star
21

spec_converter

Ruby
15
star
22

smoke_signals

CruiseControl.rb Campfire notifications
Ruby
11
star
23

cache_test

Fork of Damien Merenne's cache_test plugin. Updated to work with Rails 2.1.x.
10
star
24

jquery-demos

Demos and Presentation on jQuery
JavaScript
9
star
25

github_hook

Simple object wrapper around the Github post receive JSON payload.
Ruby
7
star
26

Iteration-Zero

Slides for Iteration Zero talk
5
star
27

clojure-async-blocks

Area to rough out async blocks in clojure
Clojure
5
star
28

prototaculous

sample code and presentation on Prototype and Scriptaculous
JavaScript
5
star
29

contegix-cloud-client

Contegix Cloud client API reference implementation
Ruby
5
star
30

relevance_rails

Relevance awesome sauce packaged up in an easy to use gem
Ruby
5
star
31

obsidian

It's metastable
Ruby
5
star
32

connectomatic

A simple gem that makes it easy to use multiple databases from Rails
Ruby
4
star
33

relevant-datetime

Datetime widget for Relevant
Ruby
4
star
34

relevant-hudson

Hudson widget for Relevant
Ruby
4
star
35

relevant-google-calendar

Google Calendar plugin for Relevant
Ruby
4
star
36

ending-legacy-code

Ending legacy code in our lifetime
4
star
37

koality

Runs opinionated code quality tools as part of you test stuite
Ruby
4
star
38

relevant-html

Simple html widget for Relevant
Ruby
3
star
39

automan

Let's just say it's awesome. Fair enough?
JavaScript
3
star
40

relevant-twitter

Twitter widget for the Relevant radiator
Ruby
3
star
41

boomstick

Boomstick tries to make it easier to explore Clojure and Datomic by generating an Ubuntu image containing a selection of Clojure editors, Datomic, and supporting software.
Shell
3
star
42

git-control

Git Control of Your Source (conference talk)
3
star
43

elzar

BAM!
Ruby
3
star
44

relevant-eventbrite-signups

Show event signups on Relevant
Ruby
3
star
45

jvm-shootout

JVM Shootout: Examples and presentation on various JVM languages
Clojure
3
star
46

relevant-widget

Base widget functionality for widgets
Ruby
3
star
47

relevant-github

View github feeds via Relevant
Ruby
3
star
48

rails-template

Build a Rails template for Relevance projects!
Ruby
3
star
49

relevance_portfolio_iteration_switcher

Simple switcher for navigating between iterations of projects in our portfolio.
Ruby
1
star
50

fluxion

Asynchronous metric collection, aggregation, and delivery
Clojure
1
star
51

slushy

Aussie kitchenhand helping in the provisional kitchen with Fog and Chef
Ruby
1
star
52

refactotum

Refactotum -- Presentation for RailsConf 2011 Refactotum Tutorial
1
star