Skip to content

Instantly share code, notes, and snippets.

@quirkey
Created June 9, 2009 04:01
Show Gist options
  • Select an option

  • Save quirkey/126254 to your computer and use it in GitHub Desktop.

Select an option

Save quirkey/126254 to your computer and use it in GitHub Desktop.
# in test_helper
def mock_fetch(data)
curb_response = mock
curb_response.expects(:body_str).returns(data)
Curl::Easy.expects(:perform).returns(curb_response)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment