LukeMathWalker / wiremock-rs

HTTP mocking to test Rust applications.
Apache License 2.0
620 stars 70 forks source link

Improved mock expectations not satisfied message #45

Closed kellpossible closed 3 years ago

kellpossible commented 3 years ago

I get the following panic message when my mock expectation is not met.

thread 'my_test' panicked at 'Verification failed: mock expectations have not been satisfied.

It would be good for the error message to be more explicit with how it has failed to meet this expectation. In my situation showing the expected number of calls, and the actual number of calls.

LukeMathWalker commented 3 years ago

Hey @kellpossible!

This has already been addressed in the master branch by @MarcoIeni a few weeks ago - see https://github.com/LukeMathWalker/wiremock-rs/blob/92c7bc99de484b0963415070bfc73ccb62c416ab/src/verification.rs#L16

It just needs to be released - there is a breaking change, so I was hoping to bundle together a few more improvements but it'd probably makes sense to just release what we have at the moment. I'll try to cut a release later today/tomorrow.

kellpossible commented 3 years ago

@LukeMathWalker awesome!