[rspec-users] unusual challenges speccing external software

David Chelimsky dchelimsky at gmail.com
Thu Jan 17 12:23:21 EST 2008

On Jan 17, 2008 10:24 AM, Giles Bowkett <gilesb at gmail.com> wrote:
> > At the risk of sounding a bit silly, what's your question? I couldn't
> > find a question mark in the whole email...?
> OK, well, am I on the right track? Should I do it differently? If so,
> in what particular way?

Giles - I think you'll find more people with more experience in this
area on the testdrivendevelopment at yahoogroups.com list. That said, and
only having glanced at your mail, here's a thought or two:

The TDD line on this, as I understand it, is that you should write
your main application code exactly as you want to write it, imagining
that you had the perfect API to talk to and stubbing that API in your
tests. Then, when hooking up to the real services, you write thin
adapters that simply convert messages to the right format. I *think*
that's what you said you are doing.


> If you were speccing external software, would you do it this way? Do I
> sound like a crazy person? If yes, more so than usual? Or only as much
> as I usually do? Is this a sensible way to spec software which
> interacts with but has no direct access to external software, or
> should I just isolate my dependencies on external software and write
> it off as unspeccable while speccing everything else? Is there a good
> rule of thumb for a BDD workflow when you can't programmatically
> capture some of the output? Because that's really what the problem is.
> I built a whole set of spec objects to capture the output as text
> because the system's real output isn't capturable, and if you can't
> capture it, you can't check it against the spec. My code has flaws but
> with good specs it's pretty easy to isolate the flaws. In this case I
> can't tell yet if the flaws are just flaws in my weird semi-BDD
> approach or in the code itself. I've probably done enough question
> marks but basically, is there a good set of guiding principles I can
> use to apply RSpec well in unconventional contexts?
> --
> Giles Bowkett
> Podcast: http://hollywoodgrit.blogspot.com
> Blog: http://gilesbowkett.blogspot.com
> Portfolio: http://www.gilesgoatboy.org
> Tumblelog: http://giles.tumblr.com
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

More information about the rspec-users mailing list