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
Verify the ordering of spies. #439
Conversation
@@ -86,7 +86,7 @@ def generate_failure_message | |||
|
|||
def expected_messages_received? | |||
mock_proxy.replay_received_message_on @expectation, &@block | |||
@expectation.expected_messages_received? | |||
@expectation.expected_messages_received? && @expectation.expected_ordering_received? | |||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's a little confusing for this method to be called expected_messages_received?
when it does more than that now. Maybe it should be renamed to something like expected_messages_received_in_specified_order?
or something?
Updated the wording too. |
Refactored the loop, refactored the object message tuple to use a value objects. Ready for re-review. |
when Module then @module = module_or_name | ||
when String then @name = module_or_name | ||
when Module then @module = module_or_name; @name = nil | ||
when String then @name = module_or_name; @module = nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file has been refactored in master and I suspect this won't merge now.
LGTM. Merge away. |
Register invokation order of calls and use it to verify that spies
have been called in order correctly.
Fixes #430.