Skip to content

Instantly share code, notes, and snippets.

@sfaxon
Created May 2, 2012 23:42
Show Gist options
  • Save sfaxon/2581950 to your computer and use it in GitHub Desktop.
Save sfaxon/2581950 to your computer and use it in GitHub Desktop.
stub.get('/weather.json') {[200, {}, weather.to_json]}
stub.get('/weather.json?degrees=fahrenheit') {[200, {}, weather.merge(:temperature => 100).to_json]}
stub.post('/weather.json') {[201, {'Location' => '/weather.json'}, weather.to_json]}
stub.delete('/weather.json') {[200, {}, nil]}
stub.put('/weather.json') {[204, {}, nil]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment