Skip to content

Commit

Permalink
added unvote_for method to README
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Ellis committed Jan 16, 2012
1 parent 20b1e78 commit 5770b74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.markdown
Expand Up @@ -67,6 +67,8 @@ Usage
voter.vote_exclusively_for(voteable) # Removes any previous votes by that particular voter, and votes for.
voter.vote_exclusively_against(voteable) # Removes any previous votes by that particular voter, and votes against.

vote.unvote_for(voteable) #Clears all votes for that user

### Querying votes

Did the first user vote for the Car with id = 2 already?
Expand Down
4 changes: 2 additions & 2 deletions test/test_thumbs_up.rb
Expand Up @@ -50,10 +50,10 @@ def test_acts_as_voter_instance_methods
assert_not_nil user_for.vote_exclusively_against(item)
assert_equal true, user_for.voted_against?(item)

user_for.clear_votes(item)
user_for.unvote_for(item)
assert_equal 0, user_for.vote_count

user_against.clear_votes(item)
user_against.unvote_for(item)
assert_equal 0, user_against.vote_count

assert_raises(ArgumentError) do
Expand Down

0 comments on commit 5770b74

Please sign in to comment.