customerio / customerio-ruby

A ruby client for the Customer.io event API.
https://customer.io/docs/api/
MIT License
65 stars 75 forks source link

Use webmock to improve test coverage #41

Closed alisdair closed 8 years ago

alisdair commented 8 years ago

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.