X-Git-Url: https://projects.mako.cc/source/rubyvote/blobdiff_plain/0ef8f53fb812bcc40337a92f9c4d11ab193f73a9..f7c9e07cba2bbd115e1ae82b1a407b1c6e603775:/test/positional_test.rb diff --git a/test/positional_test.rb b/test/positional_test.rb index 3f1fcfb..a43709d 100644 --- a/test/positional_test.rb +++ b/test/positional_test.rb @@ -1,10 +1,10 @@ -#!/usr/bin/ruby +#!/usr/bin/ruby -Ilib require 'test/unit' -require 'election_test_helper' +require 'rubyvote/election' +require 'rubyvote/positional' class TestPositionalVote < Test::Unit::TestCase - include ElectionTestHelper def test_borda vote_array = Array.new @@ -12,7 +12,7 @@ class TestPositionalVote < Test::Unit::TestCase 3.times {vote_array << "CBA".split("")} 2.times {vote_array << "BAC".split("")} - test_winner( "B", BordaVote.new(vote_array).result ) + assert_equal( "B", BordaVote.new(vote_array).result.winners[0] ) end end