Nicholas Faiz wrote:
> 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).
Rspec comes with a rake task for ratching rcov. Run it after you've run
the standard rcov rake task, I'm pretty sure it just scans the HTML
output to get the coverage rate.
require 'spec/rake/verify_rcov'
RCov::VerifyTask.new(:verify_rcov) do |t|
t.threshold = 75.0 # minimum code coverage
t.require_exact_threshold = false
end
-- James Healy <[email protected]> Tue, 13 Apr 2010 09:45:01 +1000
--
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.