But mocks are a model of the dependency. I don't quite see how a fake is a better model than a mock.
In any case, I agree testing close to a real system, with actual dependencies where possible is better. But that's not done with a fake.
In any case, I agree testing close to a real system, with actual dependencies where possible is better. But that's not done with a fake.
Again, none of this is a replacement for writing integration tests where possible. Mocks have a place in the testing realm and they are not an inherently bad tool.