Understanding BDD

11 views
Skip to first unread message

vishy

unread,
Aug 13, 2008, 3:22:25 PM8/13/08
to Behaviour Driven Development
Hi,
I was going through this link
http://www.lostechies.com/blogs/jimmy_bogard/archive/2008/01/10/converting-tests-to-specs-is-a-bad-idea.aspx.

Now, suppose i have a class called when_user_performs_this_action
- in this scenario the system performs three things..should i write a
test method for each of actions like
shouldDothis1()
shouldDothis2()
shouldDothis3()

since writing test for each action system will perform will make it
clear.

regards
vishy

Joe Ocampo

unread,
Aug 13, 2008, 4:58:53 PM8/13/08
to behaviordriv...@googlegroups.com
Provided that the object under test elicits that behavior way when placed in the given context then I would think it is appropriate.  The key is defining behavior around contexts that the object is placed in.

Elizabeth Keogh

unread,
Aug 13, 2008, 7:03:29 PM8/13/08
to behaviordriv...@googlegroups.com

(Hi Joe, nice to put a face to the name at last!)

I would say: provided that the object under test delivers the
described benefit in the given context then I would think it's
appropriate. The key is having the right conversations with the right
people, to ensure that the thing being delivered is in fact desired
and beneficial. Describing the benefit that the code delivers and the
contexts on which delivery depends would make it clear to me.

"Converting to BDD syntax" smells to me like cargo-cult BDD. You can
put as many coconut shells on your ears as you like. If no one is
talking it won't make any difference.

Cheers,
Liz.

--
Elizabeth Keogh
l...@lunivore.com
l...@thoughtworks.com
http://jbehave.org
http://sirenian.livejournal.com

Reply all
Reply to author
Forward
0 new messages