每天推送5篇优质英文文章 · By makers, for makers

运营 1205 天, 推荐好文 5,350 篇, 原创简评 1,091,686 字, 原文总阅读时间 47,168 分钟, 153,767 人订阅

他认为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."

分享到: