Skip to content
chikamichi edited this page Jul 11, 2011 · 8 revisions

The lemon command can also be used to check test coverage. For this use the --coverage/-c subcommand option.

$ lemon -c test/*.rb

To ensure only the code you are interested in is checked, you can either use -r to pre-require support libraries you wish not to include in the output. Or more conveniently, supply specific namespaces to include via the --namespace or -n option.

$ lemon -c -n HelloWorld test/*.rb

NOTE: Coverage analysis can be a tad slow if there are a lot of classes to cover. Lemon takes a complete snapshot of the entire object model.