[rspec-users] Rcov - Specifying rake tasks

James Byrne lists at ruby-forum.com
Tue Feb 3 15:00:32 EST 2009

I am trying to get a customized rcov rake task working.  What I have so
far looks like this:

desc "Rcov code coverage reports"

require 'rcov/rcovtask'
require 'spec/rake/spectask'
require 'cucumber/rake/task'

task  :rcov =>  "rcov:all"

namespace :rcov do

  Rcov::RcovTask.new(:all) do
    task :rcov => "rcov:cucumber"

  Cucumber::Rake::Task.new(:cucumber) do |t|

  Spec::Rake::SpecTask.new(:rspec) do |t

  Rcov::RcovTask.new(:testunit) do |t|

Now, rake rcov:cucumber runs the cucumber rcov task as expected.
However, both rake rcov and rake rcov:all run rake rcov:testunit.  I
cannot fathom why.  Can someone explain this to me?
Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list