-#!/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
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