-
-
Notifications
You must be signed in to change notification settings - Fork 159
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
Sequencing failure messages are unclear #60
Labels
Comments
I think that given there can be many sequences and many objects and methods involved in each, it may be quite hard to come up with a more meaningful error message, but I agree it is desirable. I'll look into it. Thanks for the feedback. |
floehopper
added a commit
that referenced
this issue
Nov 18, 2023
TODO: * [ ] Add tests * [ ] Maybe improve method names? * [ ] Maybe extract more methods? * [ ] Avoid very long lines Closes #60
floehopper
added a commit
that referenced
this issue
Nov 18, 2023
I think there's more we could do in this area, but this implements @dchelimsky's suggestion which is definitely an improvement. If an invocation was unexpected because, although there is an expectation that expectation does not match due to an ordering constraint, then append "invoked out of order" to the failure message. e.g. unexpected invocation: #<Mock:mock>.foo() invoked out of order Closes #60 (only 11 years late!😅)
This was referenced Nov 18, 2023
floehopper
added a commit
that referenced
this issue
Nov 18, 2023
I think there's more we could do in this area, but this implements @dchelimsky's suggestion which is definitely an improvement. If an invocation was unexpected because, although there is an expectation that expectation does not match due to an ordering constraint, then append "invoked out of order" to the failure message. e.g. unexpected invocation: #<Mock:mock>.foo() invoked out of order Closes #60 (only 11 years late!😅)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Given this example:
The failure message is unclear:
I'd propose something like this:
The text was updated successfully, but these errors were encountered: