Quantcast
Channel: How to correct a mistake in the test, after writing implementation - Software Engineering Stack Exchange
Browsing latest articles
Browse All 6 View Live

Answer by cmaster for How to correct a mistake in the test, after writing...

I'd say, this is a case for your favorite version control system: Stage the correction of the test, keeping your code changes in your working directory. Commit with a corresponding message Fixed test...

View Article



Answer by Thomas Junk for How to correct a mistake in the test, after writing...

What is the overall goal, you want to achieve? Making nice tests? Making the correct implementation? Doing TTD religiously right? None of the above? Perhaps you overthink your relationship to tests and...

View Article

Answer by candied_orange for How to correct a mistake in the test, after...

The absolutely critical thing is that you see the test both pass and fail. Whether you delete the code to make the test fail then rewrite the code or sneak it off to the clipboard only to paste it back...

View Article

Answer by Vaughn Cato for How to correct a mistake in the test, after writing...

In this particular case, if you change the 12 to an 11, and the test now passes, I think you've done a good job of testing the test as well as the implementation, so there's not much need to go through...

View Article

Answer by jonrsharpe for How to correct a mistake in the test, after writing...

You need to know that the test is going to fail if the implementation is wrong, which isn't the same as passing if the implementation is right. Therefore you should put the code back into a state where...

View Article


How to correct a mistake in the test, after writing implementation

What is the best course of action in TDD if, after implementing the logic correctly, the test still fails (because there is a mistake in the test)? For example, suppose you would like to develop the...

View Article
Browsing latest articles
Browse All 6 View Live




Latest Images