A universal approach to mocking with continuations
5 points by crowdhailer
5 points by crowdhailer
Please don't mock. It's bad. It tightly couples your tests to the internals of the implementation you are testing. This form of mocking is the worst kind because it essentially records a transcript of what the code under test did which is not testing that the right result happened. It is only testing that the test knew all the steps that the implementation needed to do.
This has the effect of forcing you to modify all your tests if you find a more performant way to get the right outcome and making your tests incredibly fragile.