I’ve been doing a bunch of integration testing of a rails site lately. I have found it quite useful to be able to quickly view the current page in a browser.
I added the following method to my integration testing DSL:
1 2 3 4 5 6 7 8 9 |
|
It simply writes out the response body to a file and then opens it (using the `open` on a mac).
So now in my integration test, I can view the current page in a browser like this:
1 2 3 4 |
|