Hacker News new | past | comments | ask | show | jobs | submit login

I think you are making a false dichotomy. I am very, very pro TDD and very, very against mocking.

The problem is that certain architectures are very hard to test without resorting to either mocking or integration tests. In those cases you have to weigh which is better, writing painful integration tests (or not having test coverage at all) or changing the architecture, or in certain exceedingly rare cases mocking.




Possibly, but I also think I am accurately summing up DHH's article http://david.heinemeierhansson.com/2014/tdd-is-dead-long-liv... and UncleBobMartin's reply where both talk about TDD mocked tests passing in seconds.


I guess mocking or not mocking was not my take from either of their articles. I thought they were both about test scope. Mocking is one way of limiting test scope but there are others.

I'm ok with different readings of the articles as long as TDD doesn't start automatically being associated with mocking.


You'll have an uphill struggle if you want to stop TDD being mocked ;)


Well played.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: