diff options
author | Kir Shatrov <shatrov@me.com> | 2016-09-12 17:56:38 -0400 |
---|---|---|
committer | Kir Shatrov <shatrov@me.com> | 2016-09-14 11:30:09 -0400 |
commit | bc3b0e729282b6474f217806c14f293584dd8c97 (patch) | |
tree | 65c9914c4270ed1c49fb6ea27c9929da7d07a907 /README.md | |
parent | cf5f55cd30aef0f90300c7c8f333060fe258cd8a (diff) | |
download | rails-bc3b0e729282b6474f217806c14f293584dd8c97.tar.gz rails-bc3b0e729282b6474f217806c14f293584dd8c97.tar.bz2 rails-bc3b0e729282b6474f217806c14f293584dd8c97.zip |
Improve assert_response helper
When the check is failed, print the actual response body if it's not too large.
This could improve productivity when writing new tests.
Before:
```
ThemeEditorIntegrationTest#test_whatever
Expected response to be a <200: ok>, but was a <422: Unprocessable Entity>.
Expected: 200
Actual: 422
```
After:
```
ThemeEditorIntegrationTest#test_whatever
Expected response to be a <200: ok>, but was a <422: Unprocessable Entity>.
Expected: 200
Actual: 422
Response body: {"errors":["Invalid settings object for section '1'"]}
```
Diffstat (limited to 'README.md')
0 files changed, 0 insertions, 0 deletions