• K
    Add `parsed_body` to spare writing out parsing routines. · eee3534b
    Kasper Timm Hansen 提交于
    When testing:
    
    ```ruby
    post articles_path, params: { article: { title: 'Ahoy!' } }, as: :json
    ```
    
    It's common to want to make assertions on the response body. Perhaps the
    server responded with JSON, so you write `JSON.parse(response.body)`.
    But that gets tedious real quick.
    
    Instead add `parsed_body` which will automatically parse the reponse
    body as what the last request was encoded `as`.
    eee3534b
integration.rb 25.3 KB