Created
April 25, 2016 22:28
-
-
Save litvil/4bd1c208939ce3beafb710450c749062 to your computer and use it in GitHub Desktop.
Stub external request with Rspec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stub_request(:get, /some_host:9999/).with(headers: {'Accept'=>'*/*', 'User-Agent'=>'Ruby'}).to_return(status: 200, body: "stubbed response", headers: {}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment