gds-operations/vcloud-net_launcher — pull request #32 by mattbostock (2014-06-12 13:44:04+00:00)
Title: [#72169016] Add back SimpleCov

This partially reverts d3ae38c88841fd1f29e5edc90b4c9f6738234a7b with the
following differences:

Configure the SimpleCov behaviour so that it reports coverage when
`rake` completes and acts only as a 'red light' if coverage drops
significantly (by 20%) or drops below a percentage (80%).

Note that to silence the 'Coverage report generated for' message that
reports the coverage percentage when SimpleCov completes, we
monkey-patch the SimpleCov::Formatter::HTMLFormatter class.

Also, `SimpleCov#result.format!` is called by default when SimpleCov
exits[1], so there's no need for us to explicitly call it.

The SimpleCov::Formatter::HTMLFormatter#output_message _only_ prints the
'Coverage report generated for' message, so by monkey-patching it we
don't lose the other warnings that we want to keep (mentioned above).