๐”– Scriptorium
โœฆ   LIBER   โœฆ

๐Ÿ“

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

โœ Scribed by David Chelimsky, Dave Astels, Bryan Helmkamp, Dan North, Zach Dennis, Aslak Hellesoy


Publisher
Pragmatic Bookshelf
Year
2010
Tongue
English
Leaves
305
Series
The Facets of Ruby Series
Edition
1
Category
Library

โฌ‡  Acquire This Volume

No coin nor oath required. For personal study only.

โœฆ Synopsis


Behaviour Driven Development is about writing software that matters. It is an approach to agile software development that takes cues from Test Driven Development, Domain Driven Design, and Acceptance Test Driven Planning. RSpec and Cucumber are the leading Behaviour Driven Development tools in Ruby. RSpec supports Test Driven Development in Ruby through the BDD lens, keeping your focus on design and documentation while also supporting thorough testing and quick fault isolation. Cucumber, RSpec's steadfast companion, supports Acceptance Test Driven Planning with business-facing, executable requirements documentation that helps to ensure that you are writing relevant software targeted at real business needs. The RSpec Book will introduce you to RSpec, Cucumber, and a number of other tools that make up the Ruby BDD family. Replete with tutorials and practical examples, the RSpec Book will help you get your BDD on, taking you from executable requirements to working software that is clean, well tested, well documented, flexible and highly maintainable.

โœฆ Table of Contents


Contents......Page 5
Important Information for Beta Readers......Page 9
Beta 4.0---April 13, 2009......Page 10
Preface......Page 11
Getting Started with RSpec and Cucumber......Page 12
Test Driven Development: Where it All Started......Page 13
RSpec......Page 15
Cucumber......Page 16
The BDD Cycle......Page 18
Describing Features with Cucumber......Page 20
Selecting Stories for the First Iteration......Page 21
Deriving Features from Stories......Page 22
Automating Acceptance Criteria......Page 25
Steps and Step Definitions......Page 27
What We Just Did......Page 34
Describing Code with RSpec......Page 35
Red: Start With a Failing Code Example......Page 38
Green: Get the Example To Pass......Page 39
Refactor to Remove Duplication......Page 47
What We Just Did......Page 50
Adding New Features......Page 52
Scenario Outlines......Page 53
Responding to Change......Page 57
The Simplest Thing......Page 62
Examples are Code Too......Page 68
Exploratory Testing......Page 73
What We Just Did......Page 74
Adding New Scenarios......Page 76
Managing Increasing Complexity......Page 78
Refactoring In the Green......Page 80
What we just did......Page 86
Random Expectations......Page 87
Behaviour Driven Development......Page 88
How traditional projects fail......Page 89
Why traditional projects fail......Page 91
Redefining the problem......Page 96
The cost of going Agile......Page 100
What have we learned?......Page 103
Writing Software that Matters......Page 104
Mock Objects......Page 105
RSpec......Page 106
Code Examples......Page 107
Describe It!......Page 108
Pending Examples......Page 113
Before and After......Page 115
Helper Methods......Page 118
Shared Examples......Page 121
Nested Example Groups......Page 123
Expectations......Page 128
should and should_not......Page 130
Built-In Matchers......Page 131
Predicate Matchers......Page 140
Have Whatever You Like......Page 141
Operator Expressions......Page 145
Generated Descriptions......Page 146
Subject-ivity......Page 148
Mocking in RSpec......Page 151
RSpec and Test::Unit......Page 152
Running Test::Unit tests with the RSpec runner......Page 153
Refactoring Test::Unit Tests to RSpec Code Examples......Page 157
What We Just Did......Page 162
The 4-1spec Command......Page 163
TextMate......Page 170
Autotest......Page 171
Heckle......Page 172
Rake......Page 174
RCov......Page 175
Global Configuration......Page 177
Custom Example Groups......Page 179
Custom Matchers......Page 182
Macros......Page 186
Custom Formatters......Page 190
What We've Learned......Page 194
Cucumber......Page 195
Behaviour Driven Rails......Page 196
BDD in Rails......Page 197
Traditional Rails Development......Page 198
Outside-In Rails Development......Page 199
Setting up a Rails project......Page 202
What We Just Learned......Page 205
Working with Cucumber in Rails......Page 206
Step Definition Styles......Page 209
Direct Model Access......Page 210
Simulating the Browser with Webrat......Page 220
Writing Simulated Browser Step Definitions......Page 221
Navigating to Pages......Page 228
Manipulating Forms......Page 230
Specifying Outcomes with View Matchers......Page 236
Building on the Basics......Page 239
Wrapping Up......Page 242
Automating the Browser with Webrat......Page 244
Writing View Specs......Page 245
Mocking Models......Page 251
Working with Partials......Page 256
Refactoring Code Examples......Page 262
What We Just Learned......Page 266
Rails Helpers......Page 268
Writing Controller Specs......Page 269
Before Filters......Page 279
Spec'ing ApplicationController......Page 285
Sending Emails......Page 289
Custom Macros......Page 290
What We Just Learned......Page 295
Rails Models......Page 296
RubySpec......Page 297
RSpec's Built-In Expectations......Page 298
Bibliography......Page 302
Index......Page 303


๐Ÿ“œ SIMILAR VOLUMES


The RSpec Book: Behaviour-Driven Develop
โœ David Chelimsky, Dave Astels, Zach Dennis, Aslak Hellesy, Bryan Helmkamp, Dan No ๐Ÿ“‚ Library ๐Ÿ“… 2010 ๐Ÿ› The Pragmatic Programmers ๐ŸŒ English

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

The RSpec Book: Behaviour Driven Develop
โœ David Chelimsky, Dave Astels, Bryan Helmkamp, Dan North, Zach Dennis, Aslak Hell ๐Ÿ“‚ Library ๐Ÿ“… 2010 ๐Ÿ› Pragmatic Bookshelf ๐ŸŒ English

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 h

The Cucumber Book: Behaviour-Driven Deve
โœ Matt Wynne, Aslak Hellesoy ๐Ÿ“‚ Library ๐Ÿ“… 2012 ๐Ÿ› Pragmatic Bookshelf ๐ŸŒ English

<DIV><p>Your customers want rock-solid, bug-free software that does exactly what they expect it to do. Yet they can't always articulate their ideas clearly enough for you to turn them into code. <I>The Cucumber Book</I> dives straight into the core of the problem: communication between people. Cucum

The Cucumber Book: Behaviour-Driven Deve
โœ Aslak Hellesoy, Matt Wynne ๐Ÿ“‚ Library ๐Ÿ“… 2012 ๐Ÿ› The Pragmatic Programmers ๐ŸŒ English

Matt Wynne and Aslak Hellesoy show you how to express your customers wild ideas as a set of clear, executable specifications that everyone on the team can read. You'll learn how to feed those examples into Cucumber and let it guide your development. You'll build just the right code to keep your cust

The Cucumber Book: Behaviour-Driven Deve
โœ Matt Wynne, Aslak Hellesoy ๐Ÿ“‚ Library ๐Ÿ“… 2012 ๐Ÿ› Pragmatic Bookshelf ๐ŸŒ English

<DIV><p>Your customers want rock-solid, bug-free software that does exactly what they expect it to do. Yet they can't always articulate their ideas clearly enough for you to turn them into code. <I>The Cucumber Book</I> dives straight into the core of the problem: communication between people. Cucum