Skip to content

Instantly share code, notes, and snippets.

@cheeyeo
Created January 21, 2011 18:38
Show Gist options
  • Save cheeyeo/790149 to your computer and use it in GitHub Desktop.
Save cheeyeo/790149 to your computer and use it in GitHub Desktop.
Example of WebMock stubbing request
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