How to configure SimpleCov to ignore #inspect methods

My coverage report is not 100% because I have several #inspect methods in my classes that I use for debugging purposes. Is there a way to configure SimpleCov to ignore all validation methods?

Thanks in advance.

+4
source share
1 answer

I know that I am late for this, but I had to do the same and found a solution.

Wrap your code with comments # :nocov:as follows:

# :nocov:
def my_debug_method
  do_something
end
# :nocov:

Documentation here: http://rubydoc.info/gems/simplecov/SimpleCov/Configuration#nocov_token-instance_method

+11
source

All Articles