Distinction between cleanup functions

Adam Hurwitz
1 min readSep 12, 2019

Clear — Deletes internal state of objects associated with mock resulting in empty object.
Unmock — Re-assigns transformation of classes back to original state prior to mock.

This is the correct distinction as confirmed by Oleksiy Pylypenko from his Twitter response.

Much appreciated for the ‘Mocking is not rocket science` series! I could not have gotten up and running as fast without it. I created a notes guide here based on the series.

Adam Hurwitz