projects
/
rubyvote
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* Entire election aborts with InvalidVoteError when an invalid vote object is passed in.
[rubyvote]
/
test
/
positional_test.rb
diff --git
a/test/positional_test.rb
b/test/positional_test.rb
index 3f1fcfb147c7be50136dc4e34aace90883286d6d..a43709d60c298103847f48403e9b5794f8510d20 100644
(file)
--- 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 'test/unit'
-require 'election_test_helper'
+require 'rubyvote/election'
+require 'rubyvote/positional'
class TestPositionalVote < Test::Unit::TestCase
class TestPositionalVote < Test::Unit::TestCase
- include ElectionTestHelper
def test_borda
vote_array = Array.new
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("")}
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
end
end
Benjamin Mako Hill
||
Want to submit a patch?