Rake task library that allows code-coverage reports to be generated using RCov (eigenclass.org/hiki.rb?rcov).
Methods
Attributes
| [RW] | excludes | Set of glob patterns that should be excluded from the test run. [none] |
| [RW] | load_paths | Extra load-paths that should be appended to $: when running the test cases. [none] |
| [RW] | no_color | If true, RCov will generate colorblind-safe output. [false] |
| [RW] | output_dir | The path to which RCov should generate output [./coverage] |
| [RW] | profile | Determines whether bogo-profiling is enabled [false] |
| [RW] | range | The color scale range for profiling output (dB) [not used] |
| [RW] | rcov_cmd | The command that runs RCov [‘rcov’] |
| [RW] | source_files | A +Rake::FileList+ holding Ruby source filenames that are included in the coverage report. This is optional - RCov finds sources by running them. However, if you do specify your files here then the coverage report will only be generated when they change. |
| [R] | taskname | The base name for the generated task [:rcov] |
| [RW] | test_files | A +Rake::FileList+ holding unit-test filenames and globs. RCov will execute these to generate the report. |
Public Class methods
Create a new RCovTask, using the supplied block for configuration, and define tasks with the specified base-name within Rake.
Note that the named task just invokes a file task for the output directory, which is dependent on test (and source, if specified) file changes.
[ show source ]
# File lib/rote/extratasks.rb, line 58
58: def initialize(name = :rcov) # :yield: self if block_given?
59: @taskname = name
60: @rcov_cmd = 'rcov'
61: @test_files = Rake::FileList.new
62: @source_files = Rake::FileList.new
63: @load_paths = []
64: @excludes = []
65: @output_dir = './coverage'
66:
67: yield self if block_given?
68:
69: define(name)
70: end