Writing your first Hello World feature (Simple)

During the first two recipes we learnt the concept of BDD and the basics of Cucumber; now we know that we can benefit from BDD using Cucumber, so it is time to write the first Hello World Cucumber feature.

Getting ready

In the first recipe we've already successfully installed Ruby, RubyGems, bundle, and Rails. To write our first Cucumber feature, we need a Rails application with Cucumber installed.

How to do it...

Now we create a Rails project and install Cucumber in the project. Follow the given steps:

  1. Create a new Rails app, cucumber_bdd_how_to, by running the following Rails command in the terminal:
    $ rails new cucumber_bdd_how_to
  2. Add gem 'cucumber-rails' into the project's Gemfile; it should be similar ...

Get Instant Cucumber BDD How-to now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.