Skip to content

Instantly share code, notes, and snippets.

@patrick99e99
Created September 29, 2011 23:43
Show Gist options
  • Save patrick99e99/1252255 to your computer and use it in GitHub Desktop.
Save patrick99e99/1252255 to your computer and use it in GitHub Desktop.
Feature: In order to see the newest or closest posts
I want to be able to change the presentational order of the posts
Background:
Given I am on the posts page
And the following posts exist:
| title | days old | distance |
| bike | 25 | 5 |
| sandwich | 6 | 10 |
| computer | .5 | 25 |
| t-shirt | 40 | 666 |
Scenario: Sorting by newest
When I click the ordering tab for newest
Then I should see the following posts in this order:
| title |
| computer |
| sandwich |
| bike |
| t-shirt |
Scenario: Sorting by closest
When I click the ordering tab for closest
Then I should see the following posts in this order:
| title |
| bike |
| sandwich |
| computer |
| t-shirt |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment