O'Reilly logo

The Cucumber Book, 2nd Edition by Steve Tooke, Aslak Hellesoy, Matt Wynne

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8Support Code

In the previous chapter, we started working through an example of how to use Cucumber to build a real application, outside-in. The system we’re building is an Automated Teller Machine (ATM) for a bank, and we used Cucumber to help us design a simple domain model that satisfied this scenario:

 Feature​: Cash Withdrawal
 Scenario​: Successful withdrawal from an account in credit
  Given I have deposited $100 in my account
  When I withdraw $20
  Then $20 should be dispensed

The code we’ve written makes the scenario pass, but the system isn’t really of any use yet: there’s no external interface for a user to interact with, just a handful of Ruby classes. Now ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required