LukeMathWalker / wiremock-rs

HTTP mocking to test Rust applications.
Apache License 2.0
631 stars 73 forks source link

This line in the README confused me a little #36

Closed asafigan closed 3 years ago

asafigan commented 3 years ago

This looks like a great project and I am really excited about trying it out.

When I read this in the README, I think I misunderstood it.

You should use one instance of MockServer for each test, to ensure full isolation and no cross-test interference.

The first time I read it, I thought it meant that you could only have one MockServer per test. But after re-reading it, I think it means that you shouldn't share MockServer between multiple tests.

I think this should be re-worded to be clearer. Something like:

To ensure full isolation and no cross-test interference, MockServers shouldn't be shared between tests. Instead, MockServers should be created in the test that they are used.

LukeMathWalker commented 3 years ago

I agree - do you want to open a PR?

asafigan commented 3 years ago

Ok, will do.