1. Skip to navigation
  2. Skip to content

The ELC Community Blog

A knowledge exchange on Ruby on Rails and Agile Development


Leopard Rcov

by Asa Wilson on November 06, 2007

When I did update to Leopard suddenly all my gems were included in my rcov results. While it was enlightening to know what the coverage was for the gems it wasn't something I wanted to see. Turns out the problem was that gems are not in the folder 'rubygems/' anymore they are in the folder 'gems/'.

I fixed this by going into vendor/plugins/rails_rcov/tasks/rails_rcov.rake and going to the to_params method and changing the folder name. Bam, everything works swimmingly again. Hooray!

Was:
def to_params
  "-o \"#{@output_dir}\" -T -x \" rubygems/*,rcov*\" --rails #{@options}"
end
Now is:
def to_params
  "-o \"#{@output_dir}\" -T -x \" gems/*,rcov*\" --rails #{@options}"
end

If you use RcovTask just change the line defining what to exclude to look like this:

Rcov::RcovTask.new('coverage') do |t|

  t.rcov_opts << '-T -x gems/*,rcov*'

end

Comments

Add a comment


home | services | Ruby on Rails Development | code | blog | company