pjurczynski / inmate_kata

Greegko and Piotr are both prisoners, locked in a solitude. There's nothing else left for them other than improving their coding quality together.. 15 minutes at a time.
GNU General Public License v3.0
1 stars 0 forks source link

When testcase is not right #4

Open Greegko opened 4 years ago

Greegko commented 4 years ago

How should we handle when one of the participant wrote wrong test?

pjurczynski commented 4 years ago

Wrong in terms:

Should be removed by the other prisoner with a description why it was removed. Write a new proper test in place.

You can do some more refactor.. but your job is basically done.

Decide by yourself if you want to take a risk and try to implement nonetheless. Proceed as normal.

But maybe it's just one step ahead? Then maybe just write a missing test and implementation. The other test leave for the other inmate.

Your call, you might want to implement it either way and proceed normally. But please leave a comment on the offending commit.


That's my take on it, what do you think?

pjurczynski commented 4 years ago

Now I see where the question came from ;).

I think it can also be approached the way you did it. But now I should only write a new test without the implementation. That's kind of punishment for writing a bad test?

Greegko commented 4 years ago

Well in TTD, if someone is writing wrong test, usually pass back to fix it because maybe they have to rethink again. In our case that would create a long delay. Also the case could be, the other person would do somehow differently and not consider a case at the early stage.