module Hoe::Cov

def activate_cov_deps

def activate_cov_deps
  dependency "simplecov", "~> 0.21", :development
end

def define_cov_tasks

def define_cov_tasks
  task :isolate # ensure it exists
  self.clean_globs << "coverage"
  desc "Run tests and analyze code coverage"
  task :cov => :isolate do
    test_task.test_prelude =
      %(require "simplecov"; SimpleCov.start { add_filter %p }) % [cov_filter]
    Rake::Task[:test].invoke
  end
rescue LoadError
  warn "simplecov not found"
end

def initialize_cov # :nodoc:

:nodoc:
def initialize_cov # :nodoc:
  self.cov_filter = %w[tmp test]
end