Permalink
Browse files

Use rcov to generate test coverage reports

  • Loading branch information...
1 parent aac1520 commit 3034802d4f534f59f1e4c2f8cb5f1854d4eb2557 @rodjek committed Jul 22, 2012
Showing with 9 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +1 −0 Gemfile
  3. +5 −0 Rakefile
  4. +1 −0 puppet-lint.gemspec
  5. +1 −0 spec/spec_helper.rb
View
@@ -3,3 +3,4 @@
.rbenv-version
Gemfile.lock
vendor/gems
+coverage/
View
@@ -6,3 +6,4 @@ gem 'rake'
gem 'rspec'
gem 'rdoc'
gem 'puppet', puppetversion
+gem 'rcov'
View
@@ -6,6 +6,11 @@ task :default => :test
RSpec::Core::RakeTask.new(:test)
+RSpec::Core::RakeTask.new(:cov) do |t|
+ t.rcov = true
+ t.rcov_opts = '--exclude "spec" --xrefs'
+end
+
### RDOC Tasks ###
require 'rdoc'
if (RDoc::VERSION.split('.') <=> ['2','4','2']) >= 0
View
@@ -16,6 +16,7 @@ Gem::Specification.new do |s|
s.add_development_dependency 'rspec'
s.add_development_dependency 'rdoc'
+ s.add_development_dependency 'rcov'
s.authors = ['Tim Sharpe']
s.email = 'tim@sharpe.id.au'
View
@@ -1,3 +1,4 @@
+require 'rspec/autorun'
require 'puppet-lint'
#class PuppetLint::Warning < Exception; end

0 comments on commit 3034802

Please sign in to comment.