Permalink
Browse files

fix cover_me usage

  • Loading branch information...
1 parent e005db5 commit 43730aebdb5db9254abefc832a80554a585bc32a @nov committed Feb 21, 2012
Showing with 9 additions and 6 deletions.
  1. +9 −3 Rakefile
  2. +0 −3 spec/spec_helper.rb
View
@@ -5,9 +5,15 @@ require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
if RUBY_VERSION >= '1.9'
- require 'cover_me'
- CoverMe.config do |c|
- c.file_pattern = /(#{CoverMe.config.project.root}\/lib\/.+\.rb)/i
+ namespace :cover_me do
+ desc "Generates and opens code coverage report."
+ task :report do
+ require 'cover_me'
+ CoverMe.complete!
+ end
+ end
+ task :spec do
+ Rake::Task['cover_me:report'].invoke
end
else
RSpec::Core::RakeTask.new(:rcov) do |spec|
View
@@ -1,8 +1,5 @@
if RUBY_VERSION >= '1.9'
require 'cover_me'
- at_exit do
- CoverMe.complete!
- end
end
require 'rspec'

0 comments on commit 43730ae

Please sign in to comment.