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[37] web framework to serve our user interface, and we’ll use the Capybara[38] gem to automate it. We won’t go into much detail about how Capybara works here, but you’ll learn much 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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access