Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Setup rcov.

  • Loading branch information...
commit 8457ee8419efb9f74f57c4d5f759f4fb4d6f1b64 1 parent b3faf00
@myronmarston myronmarston authored dchelimsky committed
Showing with 17 additions and 2 deletions.
  1. +1 −1  .gitignore
  2. +1 −0  Gemfile
  3. +15 −1 Rakefile
View
2  .gitignore
@@ -1,6 +1,6 @@
*.sw?
.DS_Store
-coverage
+coverage*
rdoc
pkg
doc
View
1  Gemfile
@@ -9,6 +9,7 @@ gem "rspec-expectations", :path => "."
gem "rspec-core", :path => "../rspec-core"
gem "rspec-mocks", :path => "../rspec-mocks"
gem "watchr"
+gem "rcov"
case RUBY_VERSION
when '1.9.2'
View
16 Rakefile
@@ -18,8 +18,22 @@ class Cucumber::Rake::Task::ForkedCucumberRunner
end
end
-Cucumber::Rake::Task.new do |t|
+desc "Run all examples using rcov"
+RSpec::Core::RakeTask.new :rcov => :cleanup_rcov_files do |t|
+ t.rcov = true
+ t.rcov_opts = %[-Ilib -Ispec --exclude "gems/*,features"]
+ t.rcov_opts << %[--text-report --sort coverage --no-html --aggregate coverage.data]
+end
+
+task :cleanup_rcov_files do
+ rm_rf 'coverage.data'
+end
+
+Cucumber::Rake::Task.new :cucumber => :cleanup_rcov_files do |t|
t.cucumber_opts = %w{--format progress}
+ t.rcov = true
+ t.rcov_opts = %[-Ilib -Ispec --exclude "gems/*,features"]
+ t.rcov_opts << %[--text-report --sort coverage --aggregate coverage.data]
end
task :default => [:spec, :cucumber]
Please sign in to comment.
Something went wrong with that request. Please try again.