Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
blog:better_tests_through_mocking [2016/02/10 23:02]
clay [Better Tests Through Mocking]
blog:better_tests_through_mocking [2017/11/25 12:17] (current)
clay [Better Tests Through Mocking]
Line 1: Line 1:
 ====== Better Tests Through Mocking ====== ====== Better Tests Through Mocking ======
- 
-{{http://​www.larkwire.com/​static/​content/​images/​ipad/​LBNA1/​NorthernMockingbird.jpg?​200}} 
  
 If you have even a moderately complex application,​ writing tests can be a real pain.  You either wind up writing complex, fragile tests, or you skip it altogether. There is a third path: fake out all of the parts that you aren't testing in this test.  You can examine the fake parts to see what has been done with them, and you can make them respond however you want to your program. If you have even a moderately complex application,​ writing tests can be a real pain.  You either wind up writing complex, fragile tests, or you skip it altogether. There is a third path: fake out all of the parts that you aren't testing in this test.  You can examine the fake parts to see what has been done with them, and you can make them respond however you want to your program.