Cucumber

Useful regular expressions

Dealing with singular and plurals for step definitions

Example feature statements:

Given I have 8 companies created in the system

Given I have 1 company created in the system

Corresponding step definition:

Given(/^(\d+) compan(?:y|ies) (?:is|are) created in the system$/) do |number_of_companies|

 

Opinions about People, Process and Technology

Optimization WordPress Plugins & Solutions by W3 EDGE