Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fix double block call and add global stub hook #139

merged 3 commits into from Nov 18, 2011


None yet
2 participants

myronmarston commented Nov 18, 2011

Do one of you want to code review this before I merge this in?

myronmarston added some commits Nov 18, 2011

@myronmarston myronmarston Lock to a curb version that doesn't have double-request problems.
Curb 0.7.16 causes 16 tests to fail.  Curb 0.7.15 doesn't.  This
should be fixed at some point, but for now to get the build green
so I can work on other things, I'm locking to 0.7.15.

See issue #136 for more info.
@myronmarston myronmarston Ensure stub.with block is only called once per request.
Previously it was called 2 or even 3 times for one request,
which made it difficult to put any behavior in the hook
besides returning true or false as you had to keep track of the request
to see if the hook was being called again for the same request.
@myronmarston myronmarston Add WebMock.globally_stub_request.
This allows easier integration with WebMock by another library like VCR so it can register a global hook to handle every request.

bblimke commented Nov 18, 2011

Looks good to me. Wow, I can't believe stub with block was called twice in so many places.

@myronmarston myronmarston merged commit 2fe6808 into master Nov 18, 2011

@davidbegin davidbegin deleted the fix_double_block_call branch May 10, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment