Created
February 18, 2009 05:21
-
-
Save jsmestad/66208 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Feature: Manage Snippets | |
| Scenario: Submit New Snippet | |
| Given I am logged in | |
| And I visit the main page | |
| When I click "Submit New" | |
| And I fill in "Title" with "Rails 3 Commit" | |
| And I fill in "Code" with "def hello(thing)" | |
| And I press "Submit" | |
| Then it should be successful | |
| And I should see a notice message | |
| Scenario: Viewing Snippet Queue | |
| Given that a snippet exists | |
| And I am logged in as an "admin" user | |
| When I visit the main page | |
| And I click "Snippet Queue" | |
| Then I should see "1" "pending" snippet | |
| Scenario: Approving Snippet | |
| Given that a snippet exists | |
| And I am logged in as an "admin" user | |
| And I am on the snippet queue page | |
| When I press "Approve" | |
| Then I should see a notice message | |
| And I should see "1" "approved" snippet | |
| Scenario: Snippet Selection | |
| Given that a snippet exists with the title "Snippet Today" | |
| And that snippet is approved | |
| And the time is "11:59pm" | |
| When the clock hits "12:00am" | |
| And I visit the main page | |
| Then I should see a snippet with the title "Snippet Today" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Feature: Manage Refactors | |
| Scenario: New Refactor | |
| Given I am logged in as "john_doe" | |
| And that a snippet exists | |
| When I click "Refactor" | |
| And I fill in "Code" with "@thing.each { |x| x.thingy }" | |
| And I press "Submit" | |
| Then I should see a refactor by "john_doe" | |
| And I should see a notice message | |
| Scenario: Vote For Refactor | |
| Given I am logged in | |
| And that a snippet exists with a refactor | |
| When I click "+1" | |
| Then I should see a notice message | |
| And the score should increase from "0" to "1" | |
| Scenario: Vote Against Refactor | |
| Given I am logged in | |
| And that a snippet exists with a refactor | |
| When I click "-1" | |
| Then I should see a notice message | |
| And the score should increase from "0" to "-1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment