Setting up cucumber in rails project

Setting up cucumber in rails project is pretty much simple.

Lets do this:

From your unix environment, terminal to run one after another:

rails new my_projects
//rails g scaffold post title:string text:text
// rails g model comment post_id:integer text:text 
// rake db:migrate
// rails s

Now, open your Gemfile and add that block of code

group :test, :development do
  gem 'cucumber-rails', :require => false
  gem 'database_cleaner'

Once you’ve added. Run simply “bundle install”

rails generate cucumber:install

That’s it :). Now, you can have similar structure. You can start your project scratch.

Screen Shot 2015-12-06 at 8.41.56 PM