Many development projects that I have been on have held this undeniable tension of do it now, but make sure that it gets done right…eventually. That sucks. So how can we mitigate this problem? With specs of course.
Need to get it done now, but done right later? Here ya go-
Group.new.should.respond_to(:encrypted_group_name) if Date.today > Date.new(2012, 12, 01)
If the code has not been refactored to meet the criteria by December 01, 2012, our specs will fail. There are some quite obvious issues that can be observed, but for what we needed to do today, it will improve life for us tomorrow.
What have you done to ensure that code gets cleaned up?