RSpec CircleCI Coverage
A RSpec plugin that generates coverage data for CircleCI's Smarter Testing.
Usage
Install the plugin:
gem install rspec-circleci-coverage
Add the plugin to your spec_helper.rb
require "rspec-circleci-coverage"
To generate coverage, set the CIRCLECI_COVERAGE environment variable:
CIRCLECI_COVERAGE=coverage.json bundle exec rspec
Development
Run the integration tests:
bundle install
bundle exec rspec
Generate the testsuite integration test:
circleci run testsuite 'integration test' --local --test-analysis=all && cat coverage.json | jq --sort-keys > coveragetmp.json && mv coveragetmp.json coverage.json