Skip to content

Instantly share code, notes, and snippets.

@h-lame
Created November 16, 2010 21:32
Show Gist options
  • Save h-lame/702554 to your computer and use it in GitHub Desktop.
Save h-lame/702554 to your computer and use it in GitHub Desktop.
Feature: Allowing users to vote for an answer
As a visitor to the FAQ site
I want to be able to vote for the answer I think is best
In order to crowd-source the question having the most relevant answer
Scenario: I can vote for an answer
Given there is a question "What is jam?"
And it has been answered "Lovely sticky fruit stuff, best smeared on toast"
And it has been answered "A problem with too much traffic"
When I am on the page for question "What is jam?"
Then I should see "0 votes" for the answer "Lovely sticky fruit stuff, best smeared on toast"
And I should see "0 votes" for the answer "A problem with too much traffic"
When I press the "+" voting button for "Lovely sticky fruit stuff, best smeared on toast"
Then I should see "Vote accepted"
And I should see "1 vote" for the answer "Lovely sticky fruit stuff, best smeared on toast"
And I should see "0 votes" for the answer "A problem with too much traffic"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment