RubyGems Navigation menu

api_rspecta 0.0.3

`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

Gemfile:
= Copy to clipboard Copied!

install:
=

Versions:

  1. 0.0.3 - March 04, 2016 (9 KB)
  2. 0.0.2 - December 20, 2014 (9 KB)
  3. 0.0.1 - December 20, 2014 (8 KB)

Development Dependencies (3):

bundler ~> 1.7
rake ~> 10.0
rspec ~> 3.0.0

Owners:

Authors:

  • Smart Cloud, Inc., Alex Bush, Alex Petropavlovsky

SHA 256 checksum:

b73a51cde4a4c01a7096c3ac84ea5b7ee79f6f7aef434a1e5ed88c1c48c2feb2

Total downloads 9,330

For this version 3,343

License:

MIT

Required Ruby Version: >= 0

Links: