A spy differs from mock objects in term of behavior corroboration. A spy acts more like a logger and instead of setting up behavioral expectations, it will log the calls made to the co-worker. A unit test will later assert the logs from the spy.
With Safari, you learn the way you learn best. Get unlimited access to videos, live online training,
learning paths, books, interactive tutorials, and more.