Skip to content

Instantly share code, notes, and snippets.

@mjul
Created January 27, 2012 12:29
Show Gist options
  • Save mjul/1688552 to your computer and use it in GitHub Desktop.
Save mjul/1688552 to your computer and use it in GitHub Desktop.
Tip for formatting tree data structures in Cucumber / SpecFlow
# You can use indentation to make tree data more readable in tables
# The step defs use the ids to link up the data, and trims
# the indentation / underscores which is just there to
# visualize the tree structure
Given the following org units
| id | parent | name |
| 1 | | Corporate |
| 11 | 1 | __ Danish Subsidiary |
| 12 | 1 | __ Partner Company |
| 121 | 12 | ____ Partner Client |
And the following users
| id | name | unit |
| 1 | Alice Corporate | 1 |
| 2 | __ Bob Subsidiary | 11 |
| 3 | __ Carol Subsidiary | 11 |
| 5 | __ Dave Partner | 12 |
| 4 | ____ Eve Partnerclient| 121 |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment