Created
January 21, 2011 18:38
-
-
Save cheeyeo/790149 to your computer and use it in GitHub Desktop.
Example of WebMock stubbing request
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(:post, @post_regexp).with(:body => @post_data) | |
.to_return(:status => 200, :body => "",:headers => {'content-type' => 'application/json; charset=utf-8'}) | |
# example of a tub request using webmmock - refer to the original gem sit for more usage details |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment