Hesham, nice summary!
However, TDD procedure is a bit different that you presented in the article (or I misunderstood your intention).
In the first step, there should be a failing test prior to any implementation code. Later, as you have your “dummy” implementation, instead of creating 2 additional…
You are right, with this particular case,
LogMock would behave as expected. However, there are two downsides of an approach that you suggest:
* you knew (or easily deduced) what happens in a body of
verbose(message:) . What if you don’t know (or simply don’t want to know) how does implementation look like. Keep in mind that a use-case that I describe…