danger-simplecov_json

License Gem Build Status

Report your Ruby app test suite code coverage in Danger.

Before using this plugin, you need to setup your project to use SimpleCov to get code coverage information and simplecov-json to format it as JSON.

How does it look?

1 Message
:book: Code coverage is now at 99.15% (1512/1525 lines)

Installation

Add this line to your Gemfile:

gem 'danger-simplecov_json'

Usage

Just add this line to your Dangerfile:

simplecov.report 'coverage/coverage.json'

You can also make the message not sticky:

simplecov.report('coverage/coverage.json', sticky: false)

Individual File coverage

In addition, you can see coverage for the files you've added or modified in git:

simplecov.individual_report('coverage/coverage.json', Dir.pwd)

License

MIT

Development

  1. Clone this repo
  2. Run bundle install to setup dependencies.
  3. Run bundle exec rake spec to run the tests.
  4. Use bundle exec guard to automatically have tests run as you make changes.
  5. Make your changes.