Created
July 13, 2012 20:34
-
-
Save dpisarewski/3107282 to your computer and use it in GitHub Desktop.
Rcov tasks for RSpec and Cucumber
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if Gem.available?('rspec') | |
require 'rspec/core/rake_task' | |
desc "Run all specs with rcov" | |
RSpec::Core::RakeTask.new("spec:coverage") do |t| | |
t.rcov = true | |
t.rcov_opts = '-o rspec_coverage --rails --include views -Ispec --exclude gems\/,spec\/,features\/,seeds\/' | |
t.spec_opts = "-c -f h -o rspec.html" | |
end | |
end | |
if Gem.available?('cucumber') | |
require 'cucumber/rake/task' | |
desc "Run all features with rcov" | |
Cucumber::Rake::Task.new("cucumber:coverage") do |t| | |
t.rcov = true | |
t.rcov_opts = '-o cucumber_coverage --rails --include views -Ispec --exclude gems\/,spec\/,features\/,seeds\/' | |
t.cucumber_opts = "-f html -o cucumber.html" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment