[rspec-users] outside-in BDD vs writing examples up front

Edvard Majakari edvard at majakari.net
Thu Feb 7 03:45:01 EST 2008

This is a short reply, but thinking about it a bit deeper, I have to
agree with Dan. What especially caught my
attention was this piece:

> If you start with a narrow, end-to-end piece of functionality and drill into
> it from the outside, right through until you have it working, you will find
> that at each layer of abstraction you will have a pretty focused subset of
> behaviour to implement to get the job done.

I think this comment is brilliant, as it is a more concrete viewpoint of
what "BDD manifesto" mentions about business value

As it happens, one of my main concerns with TDD was that it didn't
seem to have any strong opinions or rules about

  a) order of writing specifications regarding level of abstraction or
architectural structure (eg. I prefer V, C, M spec order in Rails, as
it starts from what the supposed client would see)

  b) how to pick the first test/spec you are going to implement.

Dan, I think your post gave an excellent answer (well, at least one)
to those questions -- and it also seems to be an opinion popular among
those few BDD practitioners _I know_ of; outside-in practically clears
out part a), as you are starting with high-level stuff like stories,
going deeper driven by requirements of higher level entities. Part b)
becomes much easier when you think about the clients priorities: what
feature gives the most business value for the client at the moment?
When starting an issue tracking system from the scratch, probably the
ability to submit new tickets becomes first -- that is, even before
being able to view them. Though quite obvious in retrospective, the
emphasis on business value in BDD gives IMO extra structure and
support for otherwise rather chaotic field of software engineering,
especially when the idea is applied in concrete rules of the


"One day, when he was naughty, Mr Bunnsy looked over the hedge into
Farmer Fred's field and it was full of fresh green lettuces. Mr
Bunnsy, however, was not full of lettuces. This did not seem fair."
  -- Terry Pratchett, Mr. Bunnsy Has An Adventure

More information about the rspec-users mailing list