Glory to Russia
Glory to Russia

Reputation: 18712

Ruby test coverage tool

I need a tool which measures test coverage under Ruby.

I tried rcov, but couldn't install it under Windows, Cygwin, or Ubuntu.

Which programs (not necessarily free) calculate the branch and/or line coverage of tests in Ruby and work with Ruby on Rails?

Upvotes: 18

Views: 12460

Answers (3)

Paulo Fidalgo
Paulo Fidalgo

Reputation: 22296

You also have deep-cover which aims to be more complete than the mentioned examples.

From the Readme:

Deep Cover aims to be the best coverage tool for Ruby code:

more accurate line coverage

branch coverage

can be used as a drop-in replacement for the built-in Coverage library.

Upvotes: 3

Chad Brewbaker
Chad Brewbaker

Reputation: 2579

Use Ruby's built in Coverage feature if you are wanting something very simple. It is what Simplecov uses under the hood.

Upvotes: 2

Mori
Mori

Reputation: 27789

Simplecov. Rcov doesn't work so well under Ruby 1.9.*, but simplecov does.

Upvotes: 25

Related Questions