Clone this wiki locally
Welcome to the coco wiki!
Example 1: content of the .coco.yml file to set the threshold to 80%
Example 2: content of the .coco.yml file to set the directories to 'lib' and “ext'
:directories: - lib - ext
Example 3: threshold to 80% and directories to 'lib' and “ext'
:threshold: 80 :directories: - lib - ext
Example 4: to exclude some files from the report (like a black-box source generated by a parser generator), name them from the project root
:excludes: - lib/project/file1.rb - lib/project/file2.rb
Note: YAML is very punctilious with the syntax. In particular, paid attention to not put any leading spaces or tab at all.
Example 5: You can exclude a whole directory from the report:
:excludes: - config/initializers
Example 6: Sometimes you don't want to see every uncovered files at every spec run. You can set the single_line_report variable as follow:
With such a configuration, the report could look like that:
$ rake spec [...] 26 examples, 0 failures Some files are uncovered $