- We design and build extraordinary applications for companies looking to make the next great idea a reality.
- learn more
Web 2.0 Expo: Behavior-Driven Development with Rails and RSpec

At today's Web 2.0 Expo, Greg Pollack of Rails Envy introduced me and a few hundred of my latest acquaintances to Behavior-Driven Development. Basically a mash-up of Test-Driven Development and Domain-Specific Langauges, BDD empowers developers to turn English-language spec documents into working test suites with a minimum of fuss.
Pollack's talk was titled The Art of Testing Web Applications, but his copious code examples skewed, unsurprisingly, toward Rails. Easily mixing high-level concepts with nitty-gritty code, Pollack showed how to turn existing Rails unit and integration tests into BDD tests using the RSpec framework. Although the translation from one testing framework to the other seemed almost 1:1, the difference in readability was striking. I can actually see clients and product managers/business owners using these test suites in the real world.
Given all the hype about DSLs at last fall's No Fluff Just Stuff conference, it was cool to see a real-world application of those ideas. And given Pathfinder's synthesis of User Experience Design and Agile development, it seems like RSpec is an excellent tool for us. By breaking tests down into user stories and allowing plain-English spec documents to be parsed and run, RSpec puts TDD into a common language for us and our clients.
In fact, my colleague Noel Rappin has posted about his experiences with RSpec on this very forum. Funny that I had to travel all the way to San Francisco to pay attention!
Topics: Ruby on Rails, Test Driven Development
Leave a comment
About Pathfinder
Recent
- Automated Deployments Rock
- Bandwidth profiling Flex projects and more with Charles
- iPhone SDK: UIViewController Testing & TDD
- Icons are evil; so are menus - unless you do them right
- The Truth About Designing For Security
- GWT, Gadgets and OpenSocial, Part 2
- Has Many has_many: A Refactoring Story
- The Hidden Power of Canvas
- Review of fixture_replacement2 plugin
- Chess Game Viewer in GWT
Archives
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006

