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



-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to