Yes - the rcov task I'm using is
rake specenvironment:rcov
Quite a mouthful. You can also create your own easily enough.
desc "rcov on rspec"
Spec::Rake::SpecTask.new('rcov') do |t|
t.spec_files = FileList["spec/**/*.rb"]
t.rcov = true
t.rcov_opts = ['--exclude', 'spec']
end
Again, all of this was gained from quickly glancing at existing
documentation. It "just worked" for me, so it sounds like metric_fu
might have a specific approach.
Cheers,
N.
On Apr 13, 9:32 am, Craig Ambrose <[email protected]> wrote:
> I think the problem might be specific to the way that metric_fu sets up
> rcov. I'll have a read through the metric_fu code.
>
> Craig
>
> On Tue, Apr 13, 2010 at 11:01 AM, Nicholas Faiz
> <[email protected]>wrote:
>
>
>
> > Hi,
>
> > Perhaps I'm missing something, as I'm new to rcov. I've just set rcov
> > up this very moment - I want to put a ratchet in place on our CI
> > instance. I'm not sure what is going wrong for you, but it looks like
> > I'll only have to run the rcov rake task once in our CI sequence to
> > generate coverage and test the specs.
>
> > Running rcov with rspec via a rake task reports failure (somewhat
> > roughly) for me. The rake task itself fails if it finds a spec which
> > fails. If all specs pass, the rake task completes successfully.
> > Regardless of the result, it generates reports in the coverage
> > directory, which I'm going to have to work out how to scan, I suppose,
> > for my ratchet (still working on that part).
>
> > I'm using rspec 1.3.0 and rcov 0.9.8.
>
> > Cheers,
> > Nicholas
--
You received this message because you are subscribed to the Google Groups "Ruby
or Rails Oceania" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rails-oceania?hl=en.