FizzBuzz: "Buzz" Requirement
Write the Buzz feature of the FizzBuzz kata by following the TDD approach.
We'll cover the following
So far, we’ve implemented two scenarios of the FizzBuzz kata:
- The not divisible scenario.
- The Fizz feature prints
fizz
when a number divisible by 3 is provided.
Now, let’s move to the Buzz feature.
Buzz
scenario
As a reminder, the feature states that the function has to print Buzz
when a number divisible by 5
is provided to it.
The Red phase
Let’s start by writing a new test into our test suite that allows us to move into the Red phase. We’ll use the value 5
for the next code snippet:
Get hands-on with 1200+ tech skills courses.