CompactJSON
CompactJSON is a summary-only JSON formatter for SimpleCov. For complete JSON output you probably want simplecov-json.
Installation
Add this line to your application's Gemfile:
gem 'simplecov_compact_json', require: false
And then execute:
$ bundle
Now in your spec helper:
SimpleCov.formatters = [
SimpleCov::Formatter::CompactJSON
]
The results will be written to coverage/results.json
Sample Output
{
"summary": {
"coverage": 50.00
},
"files": [
{
"filename": "foo.rb",
"coverage": 100.00
},
{
"filename": "bar.rb",
"coverage": 0.00
}
]
}
Contributing
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
- Fork it ( https://github.com/[my-github-username]/simplecov-json-lite/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request