Ruby Gem: VCR
When working on Discuss-it the team found that testing our API http requests slowed down our testing in a big way and sometimes returned inconsistent results. Since we didn’t want to test the reliability of our external dependencies VCR was the perfect tool to step in between our http request and our test.
What it does is create a ‘cassette’ file in your spec folder which records the first response to your http request and then on ‘replay’ when you rerun your tests it uses the cassette data instead. If your tests are http request heavy you’ll be able to test how the requests are handled much more consistently with VCR.