To install Cucumber, we need two gems in the Gemfile:
group :development, :test do
gem 'cucumber-rails', require: false # The false prevents a warning
Then bundle install.
Strictly speaking, database_cleaner isn’t required, but it’s valuable and gives fixture-like transaction behavior to your nonfixture using tests. The cucumber gem will be installed as a dependency of cucumber-rails. As I write this, we’re talking about version 1.3.15 of Cucumber and version 1.4.1 of cucumber_rails.
To install Cucumber, there’s a command-line generator:
rails generate cucumber:install
This creates a config/cucumber.yml file for runtime options, the actual cucumber command-line script, a rake