Enabling Cucumber support in Ruby projects
In plain Ruby projects, RubyMine provides syntax and error highlighting for feature files and step definitions, and the possibility to create step definitions "from usage". However, you have to produce the necessary folder structure yourself.
Prerequisite
Before you start, make sure that gem 'cucumber' is specified in the Gemfile of your project. If this gem is not yet installed, RubyMine will suggest you to download and install it, and all its dependencies
- Under the project root directory, create a new directory with the name features (Context menu of the project root - ).
- In this directory, create the required feature files (Context menu of the features directory - - <name>.feature ).
- In the feature file, type your scenario. Since there are no step definitions, the steps will be highlighted as unresolved. Create step definitions.
Enabling Cucumber support in Rails applications
Prerequisite
Before you start, make sure that gem 'cucumber-rails' is specified in the Gemfile of your project. If this gem is not yet installed, RubyMine will suggest you to download and install it, and all of its dependencies.
When cucumber-rails gem is activated, the cucumber:install generator appears in the list. After executing this generator, RubyMine produces the necessary files and directories:
- lib/tasks/cucumber.rake
- features/support/env.rb
- features/support/paths.rb
- On the main menu, choose .
Tip
If you fail to see the Cucumber generators in the list of available generators, perform Reload Rails generators command.
- In the pop-up window, start typing:

- Specify the generator options, and click OK. The respective generator script is executed, and displays its output in the console tab of the Run tool window.

