News for hackers. Stuff that matters.
Re:Stop Using Mocks by jdminhbg on Wednesday March 23, 2011 @10:53AM (#2359625)
I've been using ephemeral_response[1] in Ruby, there may be a similar library in whatever language you're working with. The idea is that it makes one real call to the service and caches it for a specified amount of time as a fixture. That way you don't constantly make calls against e.g. the Twitter search api, but when they change how it works in 6 months, your test will fail.

[1]: https://github.com/sandro/ephemeral_response

Re:Stop Using Mocks by jjrumi on Wednesday March 23, 2011 @11:22AM (#2359756)
I don't know if ephemeral_response solves this, but the first thing that comes into my mind is caching an error (webservice doesn't respond in time or whatever). This happened to me some times.

Caching the error is a big problem when you have a system that determines if your code is stable or not and blocks deployments in production to prevent errors.