I’ve been lurking in the list a while, and now I would like to ask you
a somewhat “noobish” question… This is the first time I’ve run
across this particular problem, so I’m not sure what to do. I’m sure
this is so common that’s in a textbook somewhere, but what is the best
way to write specs for code that calls out to an external server?
I’ve just started working on a project that will use AMQP messaging
(and the “amqp” gem), and most of the code I’ve written so far is all
about talking to a messaging server. The only alternatives I saw for
writing specs were starting said server, and mocking/stubbing out all
the code that would talk to it. I went witht he second one, but I feel
it’s a fragile approach that won’t actually allow me to find bugs,
since everything is mocked out. What is the best way to do this?