As a “mockist” TDD practitioner, should I mock other methods in the same class as the method under test?
问题 After reading Martin Fowler's Mocks Aren't Stubs, I've discovered I've been practicing TDD in the "mockist" fashion. But I'm wondering if even in mockist TDD if one can take mocking too far. Here's an updated example in Python-style pseudo-code: def sync_path(self): if self.confirm_or_create_connection(): self.sync(self.dirpath) The confirm_or_create_connection() method creates a connection to a server. I tested a method similar to this in two tests, both of which mock confirm_or_create