Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
@alexandreaquiles

This comment has been minimized.

Copy link
Owner Author

@alexandreaquiles alexandreaquiles commented Oct 5, 2010

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.