Cucumber & Repetitive Scenarios
If you have multiple scenarios where you are basically changing one or two words in each, try a Scenario Outline. It allows you to define a scenario where some of the words used can be replaced using an example table.
Scenario Outline: Eat only what is edible
  Given I have a <Item>
  When I try to <Action>
  Then I should <Succeed or Fail>
  Examples:
    | Item          | Action | Succeed or Fail |
    | shoe          | eat    | fail            |
    | banana        | eat    | succeed         |
    | glass of milk | eat    | fail            |
    | glass of milk | eat    | succeed         |Written by Sean Todd
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
 #Ruby 
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#