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

Understanding Our Goal

Our goal is to write a program that can perform calculations. Some people might call it a calculator.

We have an incredible vision of what this calculator will one day become: a cloud-based service that runs on mobile phones, desktops, and browsers, uniting the world with the opportunity of ubiquitous mathematical operations. We’re pragmatic businesspeople, though, so the first release of our program has to be as simple as possible. The first release will be a command-line program, implemented as a Ruby script. It will take input containing the calculation to be done and display the result at the command prompt.

So, for example, if the input file looks like this:

 2+2

then the output would be 4.

Similarly, if the ...

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