Convert User tests from VCR to Webmock#2
Convert User tests from VCR to Webmock#2NullTerminator wants to merge 1 commit intocontact_listsfrom
Conversation
|
bah, well that sucks. Looks like there's an open issue on webmock's github page regarding global stubs, but no activity. I really don't like the idea of calling stub_* methods when they're defined as noops. It's misleading at best. Got any other ideas? |
|
The other way I can think to make this work is to define a global/generic "before each" that just does all the stubs if needed or is a noop if doing live calls. But it seems Minitest doesn't support this. It has test_helper could define a |
Hey @m0dd3r take a look when you get back. I ended up having to have
stub_*methods that get called from within a test case. When Istub_requestcalls in theuser_mocks.rbfile they would only stub for the first test then got cleared out.There is logic in place so the
stub_*methods are noop if theLIVE_API_CALLSenvironment var is set to "true". It's sort of weird still having them called from tests when they won't stub, but it works.