5
6
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/rcov_stats_related/integrations/rspec2.rb', line 5
def invoke
require 'rspec/core/rake_task'
rcov_tests = parse_file_to_test(files_to_test)
return false if rcov_tests.empty?
RSpec::Core::RakeTask.new(@name) do |t|
t.pattern = rcov_tests
t.rcov = true
files_to_cover_parsed = parse_file_to_cover(files_to_cover).map { |f| "(#{f})".gsub("/", "\/") }.join("|")
t.rcov_opts = ["--text-summary", "--sort", "coverage", "--output", "#{File.join(self.class.root, "coverage", @name)}", "--exclude", "\"^(?!(#{files_to_cover_parsed}))\""]
end
end
|