small medium large xlarge

The RSpec Book: Behaviour-Driven Development with RSpec, Cucumber, and Friends


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 Behaviour-Driven Development in Ruby with The RSpec Book:Behaviour-Driven Development with RSpec, Cucumber, and Friends (Pragmatic Bookshelf, $38.95), 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.

The authors explain why this style of writing code is significantly better than traditional attempts: “The problem with testing an object’s internal structure is that we’re testing what an object is instead of what it does. What an object does is significantly more important. BDD puts the focus on behavior instead of structure, and it does so at every level of development. Whether we’re talking about an object calculating the distance between two cities, another object delegating a search off to a third-party service, or a user-facing screen providing feedback when we provide invalid input, it’s all behavior!

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.

Available in epub, mobi, PDF direct from the publisher and in paperback from fine bookstores worldwide.

What People are Saying

“The second generation of tools for the XP generation explained by their creators and maintainers. Awesome, a must read.”—Marcus Ahvne, software developer, Valtech

“There is something here for everyone: beginners are given plenty of gentle attention but there is some real meat for the more experienced reader to chew on, too.”—Matt Wynne, independent programmer and coach

“Some authors would be satisfied with just writing the definitive guide for a technology. These folks go a step further, and show you insider tips that will keep your tests clean and maintainable.”—Ian Dees, Software Engineer

Book Information

Cover Image For The RSpec Book…

The RSpec Book

Behaviour-Driven Development with RSpec, Cucumber, and Friends

by David Chelimsky, Dave Astels, Zach Dennis, Aslak Hellesøy, Bryan Helmkamp, Dan North

ISBN: 9781934356371, 450 pages, $38.95US, $44.95CA, 7.5×9.

Pragmatic Bookshelf Titles are distributed to bookstores internationally by O’Reilly Media.

Additional Resources

Sample chapters, table of contents, and more information is available on the book’s home page.

About Pragmatic Bookshelf

The Pragmatic Bookshelf features books written by developers for developers. The titles continue the well-known Pragmatic Programmer style, and continue to garner awards and rave reviews. As development gets more and more difficult, the Pragmatic Programmers will be there with more titles and products to help programmers stay on top of their game.


Press and Editorial Queries Only:
Contact Andy Hunt or Dave Thomas
Pragmatic Bookshelf
800-699-7764 (+1 919-847-3884)

<< HTML5 and CSS3: Develop with Tomorrow's Standards Today | Pragmatic Guide to JavaScript >>