Instead of mocking at the HTTParty interface, use webmock to stub out HTTP requests directly.
Two motivations:
We can be more certain about what is going out to our API servers, since we're asserting against HTTP requests and responses;
We can change our underlying HTTP library and retain the test coverage at the HTTP level.
The only change to the client itself is adding Content-Type: application/x-www-form-urlencoded for non-JSON requests. I believe this should have no effect on our API servers, but is required for webmock to auto-decode the request body.
Instead of mocking at the HTTParty interface, use webmock to stub out HTTP requests directly.
Two motivations:
The only change to the client itself is adding
Content-Type: application/x-www-form-urlencoded
for non-JSON requests. I believe this should have no effect on our API servers, but is required for webmock to auto-decode the request body.