Created
May 11, 2020 10:38
-
-
Save naush/def2aab077509265ed0abd46fb97499c to your computer and use it in GitHub Desktop.
Ranked Choice Kata – First Test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # frozen_string_literal: true | |
| class RCV | |
| def count(votes:, candidates:); end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # frozen_string_literal: true | |
| require './rcv' | |
| describe RCV do | |
| describe '#count' do | |
| context 'no winner' do | |
| subject { RCV.new.count(votes: [], candidates: []) } | |
| it { is_expected.to be_nil } | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment