Hacker News new | ask | show | jobs
by tpoacher 1386 days ago
I think part of it, by reading your question, is that:

a) TDD primarily refers to unit tests (it does not address other types of testing that you need to take into account when designing a program)

b) you have the wrong idea of what constitutes a 'unit' test versus other kinds of testing. Specifically, as per M. Feathers, anything that touches the filesystem, e.g. to read a file or database (as you do here), is not a unit test.

I would highly recommend Chapter 2 of M. Feathers' "Working effectively with Legacy Code" on this topic.