So, recommended reading of something by the maker of rails. This one is on testing. Test Driven Development versus Unit Testing versus System Testing.
Then he lists this one:
Holy smokes … I had just naturally assumed when people in production environments run; they use something like genetic programming to generate every possible outcome or to use loops. Nope to maybe if they are crazy. This guy asserts that not only are unit tests as buggy or illogical as the code you just wrote, but they also introduce extra coupling which leads developers in groups to just disable the flags on them everytime.
I delved down into the third article listed by and found several gems:
An even more professional approach is to leave the assertions in the code when you ship, and to automatically file a bug report on behalf of the end user and perhaps to try to re-start the application every time an assertion fails. At that same startup I mentioned above I had a boss who insisted that we not do this. I pointed out to him that an assertion failure meant that something in the program was very wrong and that it was likely that the program would produce the wrong result. Even the tiniest error in the kind of software we were building could cost a client $5 million in rework. He said it was more important that the company avoid the appearance of having done something wrong than that we stop before producing an incorrect result. I left the company. Maybe you are one of his clients today.
☞ Turn unit tests into assertions. Use them to feed your fault-tolerance architecture on high-availability systems. This solves the problem of maintaining a lot of extra software modules that assess execution and check for correct behavior; that’s one half of a unit test. The other half is the driver that executes the code: count on your stress tests, integration tests, and system tests to do tha