Ruby on Rails之父:TDD就像禁欲主义教育一样不现实

他认为TDD(Test-driven development)导致了过于复杂的系统设计,太多层的抽象,就为了能在unit test中方便mock掉慢的操作(比如db i/o, disk i/o)。他的Rails程序的测试是直接连上database的。他推荐的集成测试的框架Capybara看上去不错。 "Test-first fundamentalism is like abstinence-only sex ed: An unrealistic, ineffective morality campaign for self-loathing and shaming." "I rarely unit test in the traditional sense of the word, where all dependencies are mocked out, and thousands of tests can close in seconds." "I test active record models directly, letting them hit the database, and through the use of fixtures."