pagantis_elixir_tools v0.19.1 ElixirTools.ContractImpl
This support module helps with implementing contracts in tests. It ensures that the signature of a method is right. This is done by creating dynamically a contract for all public functions.
To use this helper, add to the contract of the module that you want to implement:
use ElixirTools.ContractImpl, module: MyApp.TestModule
Then, all mocked methods must be using @impl true
.
There is a caveat. At this moment, the specs themselves are not tested, as test files are exs files thus not dialyzable.