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

Installing Cucumber (and RSpec)

Cucumber is packaged as a gem and can be installed by running gem install cucumber. However, most of the examples in this book assume you install it via Bundler, which means having a Gemfile in the root directory of your project. Most of the examples also assume you’ll use RSpec,[75] so you’ll need that in your Gemfile too:

 source ​:rubygems
 
 group ​:test​ ​do
  gem ​'cucumber'​, ​'1.2.1'
  gem ​'rspec-expectations'​, ​'2.11.2'
 end

Cucumber will then install with the following command:

 $ ​​bundle​​ ​​install

To verify that you have installed it properly, run cucumber --help.

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