https://github.com/circleci/rspec-circleci-coverage
RSpec plugin that generates coverage data for CircleCI's Smarter Testing.
https://github.com/circleci/rspec-circleci-coverage
Last synced: 3 months ago
JSON representation
RSpec plugin that generates coverage data for CircleCI's Smarter Testing.
- Host: GitHub
- URL: https://github.com/circleci/rspec-circleci-coverage
- Owner: circleci
- License: mit
- Created: 2026-03-02T10:03:37.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-03-02T11:17:37.000Z (4 months ago)
- Last Synced: 2026-03-02T15:06:55.681Z (4 months ago)
- Language: Ruby
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RSpec CircleCI Coverage
A RSpec plugin that generates coverage data for
CircleCI's [Smarter Testing](https://circleci.com/docs/guides/test/smarter-testing/).
## Usage
Add the plugin to the Gemfile:
```ruby
gem 'rspec-circleci-coverage', :github => 'circleci/rspec-circleci-coverage'
```
Install the plugin:
```bash
bundle install
```
Add the plugin to your `spec_helper.rb`
```ruby
require "rspec-circleci-coverage"
```
To generate coverage, set the `CIRCLECI_COVERAGE` environment variable:
```bash
CIRCLECI_COVERAGE=coverage.json bundle exec rspec
```
## Development
Run the integration tests:
```bash
bundle install
bundle exec rspec
```
Generate the testsuite integration test:
```shell
circleci run testsuite 'integration test' --local --test-analysis=all && cat coverage.json | jq --sort-keys > coveragetmp.json && mv coveragetmp.json coverage.json
```