Coveralls coverage does not match SimpleCov

I am using "simplecov" and "overalls" ruby ​​stones, but the report generated by simplecov does not match the report generated by overalls.

I found that overalls do not ignore code that is wrapped in

# :nocov:

      

Here is my config

require "simplecov"
require "coveralls"

SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
  SimpleCov::Formatter::HTMLFormatter,
  Coveralls::SimpleCov::Formatter
]
SimpleCov.start

      

Is there something else I need to do to get the combination to ignore the code?

+3


source to share


1 answer


As a first step, I'll try the following:

  • create a .simplecov file in your project root folder.
  • copy the simplecov configuration to .simplecov.
  • Remove the Coverables formatter from your config. So .simplecov now looks like this:

    SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter

    SimpleCov.start

Whereas test_helper.rb looks like:



require "simplecov"
require "coveralls"

      

  1. Please try testing again and check if the problem is fixed.
0


source







All Articles