require 'spec/rake/spectask' namespace :rcov do Spec::Rake::SpecTask.new(:rspec) do |t| t.spec_opts = ['--options', "spec/spec.opts"] t.spec_files = FileList['spec/**/*_spec.rb'] t.rcov = true t.rcov_opts = lambda do IO.readlines("spec/rcov.opts").map {|l| l.chomp.split " "}.flatten end end end