Created
October 5, 2010 01:45
-
-
Save alexandreaquiles/610827 to your computer and use it in GitHub Desktop.
This file contains 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
def test_fizzbuzz_de_1_a_20 | |
sequence = [] | |
1.upto(20) do |n| | |
fizzbuzz = FizzBuzz.new(n) | |
sequence.push(fizzbuzz.run) | |
end | |
assert_equal '1,2,fizz,4,buzz,fizz,7,8,fizz,buzz,11,fizz,13,14,fizzbuzz,16,17,fizz,19,buzz', sequence.join(",") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Last test that was lacking in the codingdojo we did last saturday. I don't like the idea of passing the number as an argument to the constructor. But the actual implementation is quite readable.