patch
patch copied to clipboard
Ergonomic Mocking for Elixir
Hey, thanks for this great library! My testing logs are getting flooded by messages like ``` Error: 16:14:39.389 [error] Patch.Mock.Server Patch.Mock.Server.For.Some.Module received unexpected message in handle_info/2: {:EXIT, #PID, :normal} ```...
For the situation where a function is called 10 times, is there a way to assert what args the 6th invocation of the function was called with? `assert_called(MyModule.my_function(session_arg), 10)` In...
* Use `~c''` instead of `''` * Use `import Config` instead of `import Mix.Config` * Use latest version of ex_doc * Set minimum Elixir version to `1.13` per ex_doc requirements
First off, I really liked the API/implementation of Patch. Really enjoy using it so thanks for making it But whilst experimenting with some code coverage tooling (`mix test --cover`) noticed...
In the presence of multiple matching calls, assert_called will bind to the latest call.
Fixes #78 I wasn't 100% on if the test fit in the user tests, but given the README calls out regression tests, I felt it made the most sense.
👋 In my testing, it looks like patching does not work if a method is called from within a string interpolation expression. I took a look at the "limitations" section...
Hiya! I may be running into a "this cannot be supported" situation, but the failure mode was somewhat surprising. For a small project I was trying to patch `Kernel.node/0`, but...