Why does Spec::Rake::SpecTask delete coverage directory when using rcov? #57

Open
MikeEmery opened this Issue Apr 2, 2012 · 5 comments

Comments

Projects
None yet
2 participants

I'm trying to set up rake to combine coverage reports with cucumber and the automatic deleting of the coverage directory is complicating things. It would be nice if this was a configuration option.

Owner

dchelimsky commented Apr 3, 2012

The only references to rdoc in the rspec-1 codebase are in comments, so I don't think the problem is in Spec::Rake::SpecTask. Can you point me to the code that you think is doing this?

So sorry, I meant to write rcov. That's what I get for filing a bug without coffee :( I'll edit the original report. The code is in https://github.com/dchelimsky/rspec/blob/master/lib/spec/rake/spectask.rb

def define # :nodoc:

.......

    if rcov
      desc "Remove rcov products for #{actual_name}"
      task paste("clobber_", actual_name) do
        rm_r rcov_dir rescue nil
      end

      clobber_task = paste("clobber_", actual_name)
      task :clobber => [clobber_task]

      task actual_name => clobber_task
    end
    self
  end
Owner

dchelimsky commented Apr 3, 2012

Got it. FWIW there was no cucumber when that was written (to answer the question in the subject). Also, with rspec-2 out for well over a year now I've only been doing releases for very serious bugs (I barely have time to keep up with rspec-2 maintenance). If you want to submit a pull request I'll be glad to merge it if it's sound, but I probably won't release it until such a serious bug requires a release (which may never happen at this point).

Fair enough. The app using this is stuck on Rails 2 for the foreseeable future, from what I understand it's not possible to run Rspec 2 on Rails 2. I'll create a pull request just in case there's ever another release.

Owner

dchelimsky commented Apr 3, 2012

Much appreciated. I've got a few rails 2 apps as well, so can empathize. Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment