|
|
|
|
|
by chris_wot
950 days ago
|
|
I’m still not following what the issue is. If you refactor some code and change the behaviour of the code, and the code tests the expected behaviour and passes, then you have one of two problems: 1. You had a bug you didn’t know about and your test was invalid (in which case the test is useless! Fix the issue then you fix the test…) or 2. You had no bug and you just introduced a new one, in which case the test has done its job and alerted you to the problem so you can fix your mistake. What is the exact problem? Now if this is an issue with changing the behaviour of the system, that’s not a refactor. In that case, your tests are testing old behaviour, and yes, they are going to have to be changed. |
|