Rcov and Shoulda How to evaluate Code Coverage?

Hi
I am using rcov to measure code coverage by testings made with
Shoulda, mainly functional tests
I assumed that calling an action in the test procedure would cover all
the code in that action, that the params values activate
For example in my functional test I use get :index which should
activate most of the code in the index action, but rcov tells me that
no code in the index action is executed by ruby and that the code
coverage is only 17.5 %

Have I installed the wrong rcover. I use rails 2.3.8 and Shoulda and
rcov 0.9.11?
In my application rake file I define the following rake task
(according to what I found using googel)
Is there a better rake task to use ?

Would very much appreciate any advices !!!

require(File.join(File.dirname(FILE), ‘config’, ‘boot’))
require ‘rake’
require ‘rake/testtask’
require ‘rake/rdoctask’
require ‘tasks/rails’
require ‘shoulda/tasks’

namespace :test do
desc ‘Measures test coverage’
task :coverage do
rm_f “coverage”
rm_f “coverage.data”
rcov = “rcov -Itest --rails --aggregate coverage.data -T -x "
rubygems/,/Library/Ruby/Site/,gems/,rcov”"
system("#{rcov} --no-html test/unit/_test.rb test/unit/helpers/
_test.rb")
system("#{rcov} --no-html test/functional/
_test.rb")
system("#{rcov} --html test/integration/
_test.rb")
system(“open coverage/index.html”) if PLATFORM[‘darwin’]
end
end

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs