I've been trying to stub open
, the open-uri version, and I'm not succeeding.
I've tried doing the following but the request keeps going through:
Kernel.should_receive(:open).and_return("Whatever for now")
I've also tried to do
OpenURI::OpenRead.should_receive(:open).and_return("Whatever for now")
Since I tracked down that was where HTTP requests were made in OpenURI.
Thanks in advance for any suggestions!