Here is "Step 2" : You made it in time, thanks! Clients have a good use of it, but are unhappy as Qix is missing! In the rush we forgot to give you a last rule in bold.
It will take a number (positive integer) and provide:
- "Foo" if this number is multiple of 3
- "Bar" if this number is multiple of 5
- "Qix" if this number is multiple of 7
If number have several multiples, they appear in natural order (Foo, Bar, Qix).
We will return the given number as a string if there is no transformation to do.
Easy right! Hum. Right? Hum, hum.
Now we are making money with satisfied customers! As with all successful software, people use it and trust you to them more with it! Did you notice, the more successful a software is, the more evolutions it has to implement? We do as TDD helps deploying "almost bug free" software by implementing the features right. Note that BDD helps us to implement the right feature !
Let's go to next step, the sttep 3, where real problems begins.