Search code examples
ruby-on-railsruby-on-rails-3simplecov

How to change Coverage class for SimpleCov


I am getting Coverage is not a class (TypeError)

I have already a coverage class in my model and I added gem 'SimpleCov' and when I run Spec then Getting Coverage is not a class (TypeError).

The error comes because of coverage class in my model. so Is there any way to change coverage class in SimpleCov and give another name for that class?

Thanks In Advance


Solution

  • The author of simplecov stated that the Coverage class is in Ruby and so this is not something he can fix. I would suggest refactoring your schema to rename your Coverage class.