# Rake processing path

**URL:** <https://www.ruby-forum.com/t/rake-processing-path/159369>\
**Category:** Rails\
**Created:** [February 3, 2009, 10:37pm UTC](https://www.ruby-forum.com/t/rake-processing-path/159369 "2009-02-03T22:37:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [February 3, 2009, 10:37pm UTC](https://www.ruby-forum.com/t/rake-processing-path/159369/1 "2009-02-03T22:37:19Z")

</div>

X-Posted from RSpec mailing list

I am having a good deal of trouble grappling with how rake tasks are  
processed. In my rcov.rake file I have this:

desc “Rcov code coverage reports”

require ‘rcov/rcovtask’  
require ‘spec/rake/spectask’  
require ‘cucumber/rake/task’

#task :rcov =\> “rcov:complete”

namespace :rcov do  
…

Cucumber::Rake::Task.new(:cucumber) do |t|  
puts "Why am I in the cucumber task?  
…  
end

Spec::Rake::SpecTask.new(:rspec) do |t|  
puts "Why am I in the rspec task?  
…  
end  
end

Rcov::RcovTask.new(:testunit) do |t|  
puts "Why am I in the rspec task?  
…  
end

Rcov::RcovTask.new(:complete) do  
puts “What the hell am I doing here?”  
…  
end

end

When I run rake rcov:cucumber I see this:

Why am I in the cucumber task?  
Why am I in the rspec task?  
Why am I in the testunit task?  
What the hell am I doing here?

This indicates that the entire rake task is processed regardless of the  
argument given, which to me makes no sense at all. Can somebody explain  
why I am observing this behaviour?
