X-Git-Url: https://projects.mako.cc/source/rubyvote/blobdiff_plain/8ea54765a6dbdc22b1f99e5493eafb432210a7d8..d28df2a4166aa83fd9a0eb1f5a0599b8fc1c9798:/test/election_test.rb diff --git a/test/election_test.rb b/test/election_test.rb index 5b5664e..7675e58 100644 --- a/test/election_test.rb +++ b/test/election_test.rb @@ -16,7 +16,11 @@ class TestElectionVote < Test::Unit::TestCase assert_equal( 1, PluralityVote.new(vote_array).result.winners[0] ) end - + def test_invalid_voteobj + vote_array = [1,2,nil,1] + assert_raise(InvalidVoteError) { PluralityVote.new(vote_array).result.winners[0] } + end + def test_approval vote_array = Array.new 10.times {vote_array << "AB".split("")}