Verify and assert your HTTParty responses with ease!
Basic usage:
response = HTTParty.get 'http://example.com'
response.assert.status(200).content_type('application/json')
More advanced:
response = HTTParty.get 'http://example.com'
response.assert.status(200..299).content_type(:json)
Add this line to your application's Gemfile:
gem 'httpfiesta'
And then execute:
$ bundle
Or install it yourself as:
$ gem install httpfiesta
- Fork it ( https://github.com/cgthornt/httpfiesta/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request