Added list of changes submitted by Jeff Rose <jeff@rosejn.net>.
[rubyvote] / test / positional_test.rb
diff --git a/test/positional_test.rb b/test/positional_test.rb
new file mode 100644 (file)
index 0000000..3f1fcfb
--- /dev/null
@@ -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
+

Benjamin Mako Hill || Want to submit a patch?