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

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​​ ​​4.2.5
 $ ​​bin/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 ...

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