Module: RcovStatsRelated::Integrations::TestUnit

Defined in:
lib/rcov_stats_related/integrations/test_unit.rb

Instance Method Summary collapse

Instance Method Details

#invokeObject



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/rcov_stats_related/integrations/test_unit.rb', line 5

def invoke
  require 'rake/win32'
  files_to_cover_parsed = parse_file_to_cover(files_to_cover).map { |f| "(#{f})".gsub("/", "\/") }.join("|")
  rcov_settings = "--sort coverage --text-summary --exclude \"^(?!(#{files_to_cover_parsed}))\" "
  rcov_settings +="--output=#{File.join(self.class.root, "coverage", @name)} "
  rcov_tests = parse_file_to_test(files_to_test)
  return false if rcov_tests.empty?
  rcov_settings += rcov_tests.join(' ')
  cmd = "#{'bundle exec' if bundler?} rcov #{rcov_settings}"
  Rake::Win32.windows? ? Rake::Win32.rake_system(cmd) : system(cmd)
end

#test_nameObject



17
18
19
# File 'lib/rcov_stats_related/integrations/test_unit.rb', line 17

def test_name
  "test"
end