Categories: None [Edit]

api_rspecta

https://rubygems.org/gems/api_rspecta
https://github.com/SmartCloud/api_rspecta
`api_rspecta` adds following helper methods to test your JSON APIs with RSpec: **JSON:** - `#json` returns parsed `last_response.body` - `#refresh_json` reparses `last_response.body` - `#print_json` to `JSON.pretty_generate` last response JSON - `#json_has_key` tells you if passed json object has a `key` - `#json_has_keys` same as above but for a list of keys - `#json_has_no_key` is opposite to `#json_has_key` **Response:** - `should_respond_ok` checks if `last_response.status` was 200 - `should_respond_created` checks if `last_response.status` was 201 - `should_respond_with_no_content` checks if `last_response.status` was 204 - `should_respond_not_authenticated` checks if `last_response.status` was 401 - `should_respond_not_authorized` checks if `last_response.status` was 403 - `should_respond_not_found` checks if `last_response.status` was 404 - `should_respond_with_error_for` checks if `last_response.status` was 422 and that `json` has `errors` for passed `field` - `should_respond_with_errors_for` same as above but for a list of errors

Total

Ranking: 87,089 of 191,767
Downloads: 10,277

Daily

Ranking: 53,239 of 191,735
Downloads: 3

Depended by

RankDownloadsName

Depends on

RankDownloadsName
13,316,985,533bundler
81,282,599,693rake
29967,672,386rspec

Owners

#GravatarHandle
1iconpetalvlad
2iconalexbush