This was a great read. I find this approach to be the path of least resistance with languages like C#, but for Python or Ruby, I always find myself using a mock framework. That overhead in structure (classes, interfaces etc.) feels like it adds very little in dynamic languages and generally the mock syntax can be quite readable (notably RSpec mocks).