Table of Content
Installing cucumber for rails
Add the following test group to Gemfile
which contains cucumber-rails
gem and others related gems.
Then install the bundle to the system.
$ bundle install
Cucumber requires an installation before using it. Run the following cucumber:install command.
$ rails generate cucumber:install
create config/cucumber.yml
create script/cucumber
chmod script/cucumber
create features/step_definitions
create features/support
create features/support/env.rb
exist lib/tasks
create lib/tasks/cucumber.rake
gsub config/database.yml
gsub config/database.yml
force config/database.yml
or alternatively, you can check the options before executing the installation script.
$ rails generate cucumber:install --help
It makes use of the Capybara API. So, if you want to master the cucumber, you need to check all the tools available in the Capybara.
What’s next? We’re going to take a look at “Writing our first feature”.