KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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!
Tags (comma-separated)
Save Edits
Cancel