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

运营 1590 天, 推荐好文 6,475 篇, 原创简评 1,272,830 字, 原文总阅读时间 58,107 分钟, 198,603 人订阅

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

打赏 如果你觉得我推荐的这篇文章(或我写的简评)不错,对你有所启发,可以考虑请我喝杯咖啡。 感谢 243 位读者捐款了 $1,777.48
分享到:
App 内打开