Closed felipesere closed 1 year ago
This looks good to me 👌🏻
I'm wondering about areas worth potentially extending:
server.register(a_mock)
? I saw that body_json
method as a helper - all fields of Request
are pub
.
Is it worth adding the same mechanism to server.register(a_mock)?
That'd be a breaking change that I'd prefer to avoid.
In that case I'm happy to ship it as is. Do we need more docs on fields or something?
I think we are fine 👌🏻
The current way to interact with wiremock is to setup mocks with expectations (on bodys, headers, paths, etc) and then verify these when the server is dropped. This PR tries to sketch out an alternative interaction model, where mocks capture the requests they matched and then expose them to users for verification. This should help in separating "mock setup" from "mock verification".