Skip to content

Response output for failed examples

Compare
Choose a tag to compare
@hornc hornc released this 13 Jan 23:36
· 26 commits to master since this release

For every failed example, the rspec output includes the response body that was received, e.g.

2) API testing scenarios mismatched property type fails
     Failure/Error: expect(subject).to validate(:get, "/services/{id}.json", 200, { "id" => 1 })
        '/api/services/1.json#/name' of type String did not match one or more of the following types: integer, null  
       Response body:
        {
         "id": 1,
         "name": "hello world"
       }
     # ./spec/data/example_specs.rb:17:in `block (3 levels) in <top (required)>'