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 support for at_least and at_most #98

Merged
merged 2 commits into from
Jan 19, 2020

Conversation

xneomac
Copy link
Contributor

@xneomac xneomac commented Jan 13, 2020

Add functions expect_at_least and expect_at_most as described in issue #79.

@lipanski
Copy link
Owner

thanks, looks good!

I need to see why those tests are failing before merging, maybe I'll have to increase the minimum supported Rust version or bump that crate.

@xneomac
Copy link
Contributor Author

xneomac commented Jan 15, 2020

I have added a small modification.
Using the previous version I found something odd when using expect and expect_at_least (or expect_at_most).

mock.expect(2).expect_at_least(5).

Old behavior : the mock is expecting 5, not more.
New behavior : the mock is expecting 5 or more.

mock.expect(5).expect_at_most(2).

Old behavior : the mock is expecting 2, not less.
New behavior : the mock is expecting 2 or less.

@lipanski lipanski merged commit 2b2410f into lipanski:master Jan 19, 2020
@lipanski
Copy link
Owner

Released with 0.23.0

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