Skip to content

fix: prevent mocks from matching after exceeded expect_at_most#225

Merged
lipanski merged 1 commit into
lipanski:masterfrom
Abimael10:fix/expect-limit-matching
Feb 23, 2026
Merged

fix: prevent mocks from matching after exceeded expect_at_most#225
lipanski merged 1 commit into
lipanski:masterfrom
Abimael10:fix/expect-limit-matching

Conversation

@Abimael10
Copy link
Copy Markdown
Contributor

fix: prevent mocks from matching after exceeded expect_at_most. After this change, the assert on the bug is not passing.

Note: Left valid test --test_multiple_matched_mocks_with_expect_apply_in_order-- untouched (but adding my test below) to verify the fix, it now fails as it asserts the previous buggy behavior. Open to feedback on how you'd prefer the test updated.

Comment thread src/server.rs Outdated
Comment thread src/server.rs Outdated
@Abimael10 Abimael10 force-pushed the fix/expect-limit-matching branch from 841bd18 to b16789d Compare February 15, 2026 18:40
@Abimael10 Abimael10 marked this pull request as ready for review February 15, 2026 18:42
@Abimael10
Copy link
Copy Markdown
Contributor Author

Thank you very much for the feedback it makes total sense. I also updated some of the tests that were expected to fail after this change.

Comment thread tests/lib.rs
Comment thread tests/lib.rs
Comment thread tests/lib.rs
Comment thread tests/lib.rs
@Abimael10 Abimael10 force-pushed the fix/expect-limit-matching branch 4 times, most recently from 9380144 to edc2bb9 Compare February 19, 2026 16:57
Comment thread src/server.rs Outdated
@Abimael10 Abimael10 force-pushed the fix/expect-limit-matching branch 4 times, most recently from fb8901b to d98880b Compare February 21, 2026 20:23
Comment thread src/server.rs Outdated
Comment thread src/server.rs
@Abimael10 Abimael10 force-pushed the fix/expect-limit-matching branch from d98880b to c4560d6 Compare February 23, 2026 02:45
@lipanski lipanski merged commit edae8e9 into lipanski:master Feb 23, 2026
6 checks passed
@lipanski
Copy link
Copy Markdown
Owner

:shipit: 🎉

@Abimael10 Abimael10 deleted the fix/expect-limit-matching branch February 24, 2026 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants