elixir_mock
elixir_mock copied to clipboard
Add "was called with any number of arguments" verification
Currently,
if I want to verify that a function with arity 3 was called but I don't care about the number of args, I still have to say
import Mockex.Matchers
assert_called mock.function(any(), any(), any())
Suggestion
import Mockex.Matchers
assert_called mock.function, :any_args
# OR for consistency with other matchers
assert_called mock.function(any_number_of_args())
We can't simply use assert_called mock.function because it means "assert called with no args"