RubyMine 7.0.2 Web Help

Collecting Code Coverage with Rake Task

If a test is launched via a Rake task, it is the user's responsibility to provide code coverage measurement.

To enable rcov for Test::Unit run/debug configuration

  1. Open for editing your *.rake file, and add the following code:
    require 'rcov/rcovtask' Rcov::RcovTask.new do |t| t.libs << "test" t.test_files = FileList ['test/**/*_test.rb'] t.verbose = true end
  2. Create run/debug configuration for the task 'rcov' and run it with coverage.

See Also

Web Resources:

Last modified: 24 January 2015
comments powered by Disqus