Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "was called with any number of arguments" verification #6

Open
wanderanimrod opened this issue Jun 17, 2017 · 0 comments
Open

Add "was called with any number of arguments" verification #6

wanderanimrod opened this issue Jun 17, 2017 · 0 comments

Comments

@wanderanimrod
Copy link
Owner

wanderanimrod commented Jun 17, 2017

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant