X-Git-Url: https://projects.mako.cc/source/rubyvote/blobdiff_plain/74e5c5f3c50a36d8d8589c243395b9158977f4db..0ef8f53fb812bcc40337a92f9c4d11ab193f73a9:/test/positional_test.rb diff --git a/test/positional_test.rb b/test/positional_test.rb new file mode 100644 index 0000000..3f1fcfb --- /dev/null +++ b/test/positional_test.rb @@ -0,0 +1,18 @@ +#!/usr/bin/ruby + +require 'test/unit' +require 'election_test_helper' + +class TestPositionalVote < Test::Unit::TestCase + include ElectionTestHelper + + def test_borda + vote_array = Array.new + 3.times {vote_array << "ABC".split("")} + 3.times {vote_array << "CBA".split("")} + 2.times {vote_array << "BAC".split("")} + + test_winner( "B", BordaVote.new(vote_array).result ) + end +end +