Bootstrapping the User Interface

Now that we have a model we’re happy with, we’re going to wrap it in a simple user interface that allows the user to specify how much cash they want to withdraw. Even though it might not be a typical choice for a real ATM, we’re going to use a web form. We’ll use the Sinatra[35] web framework to serve our user interface, and we’ll use the Capybara[36] gem to automate it. We won’t go into detail about how Capybara works here, but you’ll learn more in Chapter 15, Using Capybara to Test Ajax Web Applications. We’ll start by adding the necessary gems to our project and getting the web server up and running.

Installing the Gems

Our app is growing up. We need to install another couple of Ruby gems, so let’s create ...

Get The Cucumber Book, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.