Behaviour-Driven Development (BDD) gives you the best of Test Driven Development, Domain Driven Design, and Acceptance Test Driven Planning techniques, so you can create better software with self-documenting, executable tests that bring users and developers together with a common language.
Get the most out of BDD in Ruby with The RSpec Book, written by the lead developer of RSpec, David Chelimsky.
You'll get started right away with RSpec 2 and Cucumber by developing a simple game, using Cucumber to express high-level requirements in language your customer understands, and RSpec to express more granular requirements that focus on the behavior of individual objects in the system. You'll learn how to use test doubles (mocks and stubs) to control the environment and focus the RSpec examples on one object at a time, and how to customize RSpec to speak in the language of your domain.
You'll develop Rails 3 applications and use companion tools such as Webrat and Selenium to express requirements for web applications both in memory and in the browser. And you'll learn to specify Rails views, controllers, and models, each in complete isolation from the other.
Whether you're developing applications, frameworks, or the libraries that power them, The RSpec Book will help you write better code, better tests, and deliver better software to happier users.
About the Author: David Chelimsky is the lead developer/maintainer of RSpec, and has contributed to several other open source projects including Cucumber, Aruba, and Rails. He has been developing software for over a decade, including three years training and mentoring agile teams at Object Mentor. He is currently a Senior Software Engineer at DRW Trading Group in Chicago, IL. In his spare time, David likes to play guitar, travel, and speak something resembling Portuguese.
Dave Astels is the Director of Technology at ChannelFireball.com and has been involved with software and computing for over 25 years, recently having spent several years working exclusively with Ruby and Rails. Dave wrote the article that prompted Steven Baker to start the RSpec project.
Bryan Helmkamp maintains Webrat, a Ruby library to implement acceptance tests for web applications in an expressive and maintainable way, and is an active participant in the New York City Ruby community. Bryan is the CTO of Efficiency 2.0, a startup that helps people understand and reduce their energy use.
Dan North writes software and coaches teams and organizations in agile and lean methods. He believes that most problems that teams face are about communication and understanding, which is why he puts so much emphasis on getting the words right. In 2003-4 this led him to develop the ideas that would become Behaviour-Driven Development. He is delighted by the community that has grown up around RSpec and Cucumber, and especially the enthusiasm and dedication of their core contributors. Dan is currently a Senior Software Engineer at DRW Trading Group in London, where he gets to actually code again!
Zach Dennis is a co-founder and fellow human at Mutually Human Software, an expert custom software strategy and design consultancy in Grand Rapids, Michigan. He has been enjoying Ruby for nearly eight years and has contributed to several projects such as Ruby's standard library documentation, Ruby on Rails, and RSpec. In his spare time, Zach loves spending time with his family, continuously learning, playing music, and running continuousthinking.com.
Aslak Hellesoy is a Senior Software Engineer at DRW Trading Group in London. While contributing to this book he was the Chief Scientist of BEKK Consulting in Oslo. In 2003, after seven years of professional Java programming, he fell in love with Ruby. He has contributed to dozens of open source projects and is the founder of the Cucumberproject. Aslak likes to cook, ski, and travel.