simplecov-cobertura icon indicating copy to clipboard operation
simplecov-cobertura copied to clipboard

undefined method 'formatter=' for module SimpleCov on `3.1.0`

Open ArminBeda opened this issue 3 months ago • 2 comments

In the description under "Usage" the following instruction can be read:

require 'simplecov-cobertura'

SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter

But if you do it after with 3.1.0 the following error message can be read:

Failure/Error: SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter

NoMethodError:
  undefined method 'formatter=' for module SimpleCov

But if you do it in 2.1.0, this error is not present.

ArminBeda avatar Sep 22 '25 12:09 ArminBeda

I'm having this same issue. @jessebs is there a workaround for this? I'm trying to upgrade from 2.1.0. Relevant merge request on GitLab. Thanks!

arianna-h-h avatar Oct 28 '25 20:10 arianna-h-h

require 'simplecov'
require 'simplecov-cobertura'

SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter

Adding explicit require for 'simplecov' worked for me

tachyons avatar Nov 09 '25 13:11 tachyons