¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

"bottom-up" TDD and common behaviors


 

Here¡¯s some code I have:



Here¡¯s a correctness claim about that code: ¡°any function that returns one or more Animals must ensure that those animals have ¡®updatable fields¡¯¡±. I come from a mockish tradition, in which that claim would be stated directly by an assertion that `put_updatable_fields` would be called and be used as the return value.?

I¡¯ve been trying to do non-mockish testing in this app, and I¡¯ve gotten myself all bollixed up. Without mocks, what would tests for these four functions look like?

I think I once knew the answers to such questions, but I can¡¯t remember them.

Join [email protected] to automatically receive all group messages.