Setup and TearDown considered harmful?

| 0 Comments
I'm glad that Brian Button went to the trouble of writing this post and thinking through the implications of shared setup and teardown code in tests. I've been a bit concerned about some of my tests for a while now. You see, I don't use a fancy framework, I just write them myself in C++ and generally there isn't much shared setup code because I don't find it that useful. Brian's insight that the duplication present in tests is often a good thing because it allows the test to communicate more clearly is pretty much what I've thought for a while. I just never had the time to sit down and think it all through myself. :)

Leave a comment