cucumber usage in rails project
Add below gems to your gem file $ gem'database_cleaner' $gem'cucumber-rails' $gem'cucumber' $gem'rspec-rails' Then run bundle install from your root directory. run rake db:migrate next run the below command in your project rails g cucumber:install --capybara $ above command will generate all necessary files run the below command to write cucumber stories to your application. $ touch features/support/your_test_file_name.rb go to the above file and write your application stories run below command to implement test cases for stories $ rake cucumber:wip now we can add the step defination for story in step_defination folder #features/step_definitions/yourcontroller_steps.rb Given /^a regexpress that is "(.*)"$/ do |color| Strawberry.make!(:color => color) end