Skip to content

Instantly share code, notes, and snippets.

@johnivanoff
Created March 8, 2012 02:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnivanoff/1998097 to your computer and use it in GitHub Desktop.
Save johnivanoff/1998097 to your computer and use it in GitHub Desktop.
$ cucumber
Using the default profile...
Feature: Manage locations
In order to manage locations
As a user
I want to create and edit my locations.
Scenario Outline: List locations # features/managing_locations.feature:6
Given there is a location named "<location>" # features/step_definitions/location_steps.rb:1
And I am on the <language> site # features/step_definitions/location_steps.rb:5
When I am on the locations page # features/step_definitions/location_steps.rb:9
Then I should see "<title>" # features/step_definitions/location_steps.rb:13
And I should see "<location>" # features/step_definitions/location_steps.rb:13
Examples:
| location | language | title |
| location 1 | en | Locations |
| location 2 | es | Locaciones |
Scenario Outline: : Create a new location # features/managing_locations.feature:18
Given I am on the <language> site # features/step_definitions/location_steps.rb:5
And I am on new location page # features/step_definitions/location_steps.rb:21
And I fill in "<name>" with "<location>" # features/step_definitions/location_steps.rb:25
And press "<button>" # features/step_definitions/location_steps.rb:29
Then I should see "<location>" # features/step_definitions/location_steps.rb:13
Examples:
| language | name | location | button |
| en | Name | location 1 | Create |
| es | Nombre | location 1 | crear |
Scenario Outline: Edit a location # features/managing_locations.feature:30
Given I am on the <language> site # features/step_definitions/location_steps.rb:5
And there is a location named "<location>" # features/step_definitions/location_steps.rb:1
When I "<action>" the location "<field>" to "<new_name>" # features/step_definitions/location_steps.rb:33
Then I should see "<new_name>" # features/step_definitions/location_steps.rb:13
Examples:
| language | location | action | field | new_name |
| en | location 1 | Update | Name | location has changed |
| es | location 1 | Actualizar | Nombre | location has changed |
6 scenarios (6 passed)
28 steps (28 passed)
0m5.281s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment