View Source Repatch.CoverTool (Repatch v1.6.0)
Add this cover tool to your mix project like this.
defmodule MyApp.MixProject do
use Mix.Project
def project do
[
test_coverage: [tool: Repatch.CoverTool, tool: <other_tool_if_any>]
]
end
end
It will fix coverage for modules patched by Repatch. When patched function is called, it will be counted as covered only if original implementation is called, not the patched one.
Support
As of 1.6.0, Repatch coverage was tested only for systems with native coverage (you're using one most likely). Systems with no support for native coverage may work, the code is there, but it was never actually tested.