How to enable template coverage support for simplecov

Posted . Visible to the public.

Since Ruby 3.2.0 Show archive.org snapshot you can measure coverage support for eval statements and support has been added for the simplecov gem as well Show archive.org snapshot .

This allows to track coverage across ruby templates such as haml, erb, ...

Simply set this within simplecov

SimpleCov.start do
  enable_coverage_for_eval
end
Felix Eschey
Last edit
Michael Leimstädtner
License
Source code in this card is licensed under the MIT License.
Posted by Felix Eschey to makandra dev (2023-03-29 09:05)