Closed vinibrsl closed 4 months ago
One way to achieve this today is creating a common test case using ExUnit.CaseTemplate and calling stub(TheModule)
. Then you just have to ensure that your tests are using this test case.
If we change Mimic to stub on copy we would probably need to have a way to "reset" and remove the stub as users may want to execute the original functions for some tests but stub for the majority? 🤔
stale?
When mocking external service calling modules, such as HTTP and gRPC, we might not want to these to be called without being mocked.
It would be nice to have a way to configure Mimic to raise an error when calling a copied function, such as WebMock (https://github.com/bblimke/webmock) does on Ruby with
WebMock.disable_net_connect!
, to block real web requests.