4 require 'rubyvote/election'
6 class TestElectionVote < Test::Unit::TestCase
9 vote_array = "ABCABCABCCCBBAAABABABCCCCCCCCCCCCCA".split("")
11 assert_equal( "C", PluralityVote.new(vote_array).result.winners[0] )
16 vote_array = Array.new
17 10.times {vote_array << "AB".split("")}
18 10.times {vote_array << "CB".split("")}
19 11.times {vote_array << "AC".split("")}
20 5.times {vote_array << "A".split("")}
22 assert_equal( "A", ApprovalVote.new(vote_array).result.winners[0] )