projects
/
rubyvote
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
a number of improvements
[rubyvote]
/
test
/
range_test.rb
diff --git
a/test/range_test.rb
b/test/range_test.rb
index 26d8600e3b1d2650ed75ffa6418225d189d25d41..799ba3f84e37bb729846756f5a7895395408ba50 100644
(file)
--- a/
test/range_test.rb
+++ b/
test/range_test.rb
@@
-6,6
+6,12
@@
require 'rubyvote/range'
class TestRangeVote < Test::Unit::TestCase
class TestRangeVote < Test::Unit::TestCase
+ def test_range_empty
+ vote_array = []
+ assert_nil RangeVote.new(vote_array).result.winners[0]
+ assert_equal(false, RangeVote.new(vote_array).result.winner?)
+ end
+
def test_range
vote_array = []
42.times {vote_array << {'A' => 10, 'B' => 5, 'C' => 2, 'D' => 1}}
def test_range
vote_array = []
42.times {vote_array << {'A' => 10, 'B' => 5, 'C' => 2, 'D' => 1}}
Benjamin Mako Hill
||
Want to submit a patch?