projects
/
rubyvote
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed positional test-case to test for correct winner, not most recent winner.
[rubyvote]
/
test
/
positional_test.rb
diff --git
a/test/positional_test.rb
b/test/positional_test.rb
index a43709d60c298103847f48403e9b5794f8510d20..1dc6c125099a80126517bc4bc8c0e7542e547fee 100644
(file)
--- a/
test/positional_test.rb
+++ b/
test/positional_test.rb
@@
-8,11
+8,12
@@
class TestPositionalVote < Test::Unit::TestCase
def test_borda
vote_array = Array.new
def test_borda
vote_array = Array.new
+ 2.times {vote_array << "BAC".split("")}
3.times {vote_array << "ABC".split("")}
3.times {vote_array << "CBA".split("")}
3.times {vote_array << "ABC".split("")}
3.times {vote_array << "CBA".split("")}
- 2.times {vote_array << "BAC".split("")}
-
+
assert_equal( "B", BordaVote.new(vote_array).result.winners[0] )
end
assert_equal( "B", BordaVote.new(vote_array).result.winners[0] )
end
+
end
end
Benjamin Mako Hill
||
Want to submit a patch?