projects
/
rubyvote
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
o Verify that all tests in test.rb are present in test/*_test.rb files,
[rubyvote]
/
test
/
election_test.rb
diff --git
a/test/election_test.rb
b/test/election_test.rb
index b182e2d7619d63b46c277990b4f02694de151a67..e8a9c452f1cb7c8f1f2993d66591e32f61692ab4 100644
(file)
--- a/
test/election_test.rb
+++ b/
test/election_test.rb
@@
-1,15
+1,14
@@
-#!/usr/bin/ruby
+#!/usr/bin/ruby
-Ilib
require 'test/unit'
require 'test/unit'
-require '
election_test_helper
'
+require '
rubyvote/election
'
class TestElectionVote < Test::Unit::TestCase
class TestElectionVote < Test::Unit::TestCase
- include ElectionTestHelper
def test_plurality
vote_array = "ABCABCABCCCBBAAABABABCCCCCCCCCCCCCA".split("")
def test_plurality
vote_array = "ABCABCABCCCBBAAABABABCCCCCCCCCCCCCA".split("")
-
test_winner( "C", PluralityVote.new(vote_array).result
)
+
assert_equal( "C", PluralityVote.new(vote_array).result.winners[0]
)
end
end
@@
-20,7
+19,7
@@
class TestElectionVote < Test::Unit::TestCase
11.times {vote_array << "AC".split("")}
5.times {vote_array << "A".split("")}
11.times {vote_array << "AC".split("")}
5.times {vote_array << "A".split("")}
-
test_winner( "A", ApprovalVote.new(vote_array).result
)
+
assert_equal( "A", ApprovalVote.new(vote_array).result.winners[0]
)
end
end
end
end
Benjamin Mako Hill
||
Want to submit a patch?