Skip to content

Commit

Permalink
fix cover_me usage
Browse files Browse the repository at this point in the history
  • Loading branch information
nov committed Feb 21, 2012
1 parent c84f7ed commit a2c3d09
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
12 changes: 9 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down
3 changes: 0 additions & 3 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
if RUBY_VERSION >= '1.9'
require 'cover_me'
at_exit do
CoverMe.complete!
end
end

require 'paypal'
Expand Down

0 comments on commit a2c3d09

Please sign in to comment.