Permalink
Browse files

added unvote_for method to README

  • Loading branch information...
1 parent 20b1e78 commit 5770b7490f113df4c0a4d28d926582064279aa7e @joeellis committed Jan 16, 2012
Showing with 4 additions and 2 deletions.
  1. +2 −0 README.markdown
  2. +2 −2 test/test_thumbs_up.rb
View
@@ -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?
@@ -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

0 comments on commit 5770b74

Please sign in to comment.