It is a bad idea to commit code that no one is using, as it will be hard for the reviewer to understand why it is written, and will be hard to know if code is correct.
As Im writing in TDD, before I write the code logic I write unit tests.
The tests sometimes depend on new mocks, whose first (and only) use is the tests. Applying the above principle, I don't want to commit the mocks by themselves. Thus I end up committing the unit tests and mocks in the same commit.
This makes the commit rather long, and the mocks don't feel like part of it. It will be far nicer to have them in a different commit (and maybe even have it reviewed by a different dev, that understands the mocking code better).
I know this design question can be a matter of taste, but I'm new to TDD, and feel there is probably one solution that is more correct then the other.
Any input will be appreciated.