Running the Generators

Rails uses generators to help you set up your application with typical boilerplate code that you can then customize to your needs. First we’re going to generate the Rails application, and then we’ll add the cucumber-rails plug-in and use its generator to configure your application so it’s ready for you to start driving it with Cucumber.

We start by creating our Rails application. We’re going to use the rails new command with a single option:

 
$ ​gem install rails --version 3.1.3
 
$ ​rails new squeaker --skip-test-unit

The option doesn’t matter too much—those are parts of Rails that we’re not going to use, so they’d just be cluttering up our code if we left them in.

Now we need to edit our new Rails application’s ...

Get The Cucumber Book 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.