]> projects.mako.cc - rubyvote/blob - test/positional_test.rb
Added list of changes submitted by Jeff Rose <jeff@rosejn.net>.
[rubyvote] / test / positional_test.rb
1 #!/usr/bin/ruby
2
3 require 'test/unit'
4 require 'election_test_helper'
5
6 class TestPositionalVote < Test::Unit::TestCase
7   include ElectionTestHelper
8
9   def test_borda
10     vote_array = Array.new
11     3.times {vote_array << "ABC".split("")}
12     3.times {vote_array << "CBA".split("")}
13     2.times {vote_array << "BAC".split("")}
14
15     test_winner( "B", BordaVote.new(vote_array).result )
16   end
17 end
18

Benjamin Mako Hill || Want to submit a patch?