Rcov Task

K

Koustubh Joshi

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.
 
J

Jano Svitok

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,163
Latest member
Sasha15427
Top