A great productivity comes from the small things. When making sure that the app works
fine on the new version of Rails, I had to fix failures like this one many many times:
The test was usually fairly easy and it looked like this:
Every time I wanted to look inside, I had to insert a debugger (pry)
before the assert_response line and check what kind of errors are present the response body.
I thought: what can I do to make it easier? And I came up with this patch:
Can you guess how it works?
This trick saves me and other developers a few seconds every time we need to fix a failing test.
Counting the number of failing tests we had after upgrading Rails (> 1000), this potentually saves hours of work.