[rspec-users] Cucumber step definitions vs. RSpec examples

Stephen Eley sfeley at gmail.com
Mon Mar 30 10:15:13 EDT 2009

On Mon, Mar 30, 2009 at 7:08 AM, Brandon Olivares
<programmer2188 at gmail.com> wrote:
> For me, it's either TDD or BDD, honestly. I've experienced the assurance
> having tests for nearly every line of code affords me, and don't want to
> forgo that. But I like the semantics of BDD a lot better, after reading the
> RSpec book.

Interesting.  I don't think what you're saying is invalid, but I do
think it's an _unusual_ perspective to consider TDD and BDD as an
either/or.  Depending on whom you ask, BDD is most often seen either
as an evolution/elaboration on TDD, or else the differences are viewed
as purely semantic.

Either way, though, by practicing BDD you're generally doing
everything you'd do in TDD.  You're still specifying
success-vs.-failure conditions before you write the code, and then
writing only the code necessary to achieve success.  Whether you call
those conditions 'behaviors' or 'tests' doesn't change that
fundamental pattern.

Have Fun,
   Steve Eley (sfeley at gmail.com)
   ESCAPE POD - The Science Fiction Podcast Magazine

More information about the rspec-users mailing list