[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Rcov Task

Koustubh Joshi

5/22/2007 6:53:00 AM

Hi,

Am trying to run my ruby files in rcov task,

here is the code, am using,

begin
require 'rcov/rcovtask'

Rcov::RcovTask.new do |t|

t.test_files = FileList["/**/TestCase/*.rb"]
t.verbose = true
end
rescue LoadError
puts 'Rcov is not available.'
end

There are many .rb files in that TestCase folder but it is showing the
coverage of only one file...

Will you plz help me, how i can get covrage of all .rb files.

--
Posted via http://www.ruby-....

1 Answer

Jano Svitok

5/22/2007 7:20:00 AM

0

On 5/22/07, Koustubh Joshi <jkoustubhin@gmail.com> wrote:
> Hi,
>
> Am trying to run my ruby files in rcov task,
>
> here is the code, am using,
>
> begin
> require 'rcov/rcovtask'
>
> Rcov::RcovTask.new do |t|
>
> t.test_files = FileList["/**/TestCase/*.rb"]
> t.verbose = true
> end
> rescue LoadError
> puts 'Rcov is not available.'
> end
>
> There are many .rb files in that TestCase folder but it is showing the
> coverage of only one file...
>
> Will you plz help me, how i can get covrage of all .rb files.

rcov normally excludes test files from coverage. to see what that
means, try --help or have a look at the sources. what I remember is
that tc_* are excluded, and maybe test_* and (this will interest you)
maybe test* directories. There's a command line option to include them
in the coverage, so there should an option to the task too.

J.