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

Fixing the Bug

Sometimes the signals you’ll get from the code that something is wrong are pretty faint. We always try to keep a to-do list handy and write down everything that concerns us as we go. That way, we can stay focused on the task at hand but know that we’ll get a chance to check over and clean up any inconsistencies before we move onto the next task.

As we were finishing off the last scenario, we noticed that Teller#withdraw_from takes two arguments, but only one of them was used in the method to make the scenario pass. This inconsistency means that something is wrong, but we need to investigate further to know what we need to do about it. Let’s take a look at the code that uses the method:

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