IntelliJ IDEA 2017.2 Help

Collecting Code Coverage with Rake Task

This feature is supported in the Ultimate edition only.

The following is only valid when Ruby Plugin is installed and enabled!

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

It is supposed that you have a special Rake task that collects code coverage information via rcov.

  1. Open for editing your *.rake file, and add the following code:
    require 'rcov/rcovtask' ovTask.new do |t| s << "test" t_files = FileList ['test/**/*_test.rb'] bose = true
  2. Create run/debug configuration for the task 'rcov' and run it with coverage.
Last modified: 29 November 2017

See Also