--- title: Overview inMenu: true --- h2. Behaviour Driven Development Test Driven Development (TDD) has you define the behaviour of your system by writing small tests that precisely define some small piece of your system's behaviour. Then you implement that behaviour. Then you clean up & improve your design. At least that's how you're supposed to do it. This focus on behaviour is the real value in TDD, and marks the genuinely experienced TDD practitioner. However, with the ubiquity of testing related terminology in TDD and it's supporting frameworks, it is no surprise that it takes beginners some time to get to the understanding that TDD isn't about testing at all... if they ever do. The aim of BDD is to address this shortcoming and, by using terminology focused on the behavioural aspects of the system rather than testing, attempt to help direct developers towards a focus on the real value to be found in TDD at its most successful, or BDD as we call it. (paraphrased from "behaviour-driven.org":http://behaviour-driven.org) Dan North, who was the first to coin the term BDD, and who has been actively refining it since, started promoting BDD in 2003. "JBehave":http://jbehave.codehaus.org/ was the first BDD framework to support this new thinking. h2. RSpec RSpec is a framework for practicing __Behaviour Driven Development__ (BDD) in Ruby. It all started with a blogpost ("A New Look at Test Driven Development":http://blog.daveastels.com/articles/2005/07/05/a-new-look-at-test-driven-development) of Dave's where he talked about his ideas for BDD and a BDD framework. One thing he mentioned was that his ideas would be easily implemented in Smalltalk, and probably Ruby. Steven Baker wrote the first version of the rspec core. Dave added mock support (initially inspired from Schmock by Ben Griffiths). Dave and David had met & talked about BDD at Agile'05 just after Dave's blog post (above). David started thinking about a BDD framework in C#. As fate, or the gods, would have it Dave & David ended up working at the same client in the greater Chicago area, allowing them to explore some ideas resulting in the totally rewriting of the expectation mechanism. Aslak joined in and the three rewrote the higher level syntax and the core, reworking RSpec into what you see now: context "BDD framework" do setup do @bdd_framework = BddFramework.new end specify "should be adopted quickly" do @bdd_framework.should_be_adopted_quickly end specify "should be intuitive" do @bdd_framework.should_be_intuitive end end RSpec provides a framework for writing what we call __executable specifications of program behaviour__. Since that's rather wordy, we usually just call them __specs__. "Some other people":http://www.testing.com/cgi-bin/blog/2006/04/12#spec-vs-example call these things __examples__. On this site you will find examples, documentation, and tutorials as well as links to download and community resources.