postnote

We currently have a full team here at Abletech but in saying that we're always on the look-out for great developers. If that sounds like you, feel free to get in touch.

postnote

News & Updates

Posts tagged “Ruby On Rails”

Testing HTTP interactions in Rails using VCR

by cameronfowler.

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!