Skip to content

running rake with .simplecov and rspec runs coverage report twice, second report at 0% #581

Open
@ybakos

Description

@ybakos

Project is Rails 5.x with rspec.

When configuring simplecov via spec/rails_helper.rb like this:

require 'simplecov'
SimpleCov.start 'rails'

running rake results in the expected behavior of simplecov generating a report once.

If I change the rails_helper.rb config to just:

require 'simplecov'

And use a .simplecov config file like this:

SimpleCov.start 'rails'

The coverage report is generated twice. The first report is as expected, but then gets overwritten by the second report, which displays 0% coverage for all classes.

If I just run rspec instead of rake, then only one genuine coverage report is generated.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions