Closed j0ni closed 7 years ago
@phillmv can you explain how you would prevent this from happening? What do you mean by "a setup
block"? How do I disable and reenable it in the context of a rake task?
In our case, it happens in CI, independent of testing - so, in a separate step, outside of the test step, we would have a circle.yml
line which invoked rake appcanary:check
or whatever, and it will fail because RAILS_ENV
is test
and that causes WebMock
to monkey patch Net::HTTP
. In that situation, how would you prevent WebMock
from monkey patching Net::HTTP
before invoking the rake task?
Poke me synchronously
@phillmv @j0ni what's the context of this?
getting it to work in test envs IIRC.
I'm not sure I understand why we need to make these into callbacks, rather than just providing documentation.
Anytime I would be registering a callback, I could just disable and reenable before and after the call, or in a
setup
block, right?I confess I did not see how you integrated this; is there some other reason it's really convenient?