Doc On Dev: "Necessary" Refactoring
In my mind, there are two types of refactoring; real-time and planned. In each case, we are changing the implementation without altering behavior. In each case, we need comprehensive test coverage. Without tests, we don’t know for certain if we’ve altered behavior or not.
Source: www.docondev.com