Testing HTTP interactions in Rails using VCR
If your Ruby on Rails application performs any HTTP requests to an external service, you will know they are a pain to test. The issue with these requests is that they are slow. Not only that, they are unreliable. Any self respecting programmer would do their best to avoid having live HTTP requests in their tests.
I previously have found myself creating some sort of XML file to represent the expected response from the request then stubbing out any real calls to just return this pre-made response. The concept is pretty simple, but is slow to set up, especially if you have a few different scenarios to test!