The way to make refactoring safe is to have a solid test suite.
With a good enough test suite, if all tests still pass, you can be pretty confident.
To me, making refactoring easier/safer is probably the biggest benefit of having tests!
With a good enough test suite, if all tests still pass, you can be pretty confident.
To me, making refactoring easier/safer is probably the biggest benefit of having tests!