What's the alternative? It's not always easy or practical to reach for "alternative DB implementation" because in most cases that simply doesn't exist.
Without knowing when mockery is useful, it is impossible to suggest an alternative. There may not be a viable alternative in some cases. That is why I ask. Perhaps you can give us a concrete example to work with, even if contrived? Where have you found mockery to be useful?
The above example, of course, isn't a good one as you can inject an in-memory database (i.e. a hash map) with far less effort than running the mockery tool. But, you are quite right that not all situations are as simple.
If I recall correctly, rsc says to just buckle up and provide a working implementation no matter how hard or how much work it requires, but that's easy for someone who works for Google, in a prestigious position at that, to say. We don't all live in the same lap of luxury. I grant some pragmatism here.
The above example, of course, isn't a good one as you can inject an in-memory database (i.e. a hash map) with far less effort than running the mockery tool. But, you are quite right that not all situations are as simple.
If I recall correctly, rsc says to just buckle up and provide a working implementation no matter how hard or how much work it requires, but that's easy for someone who works for Google, in a prestigious position at that, to say. We don't all live in the same lap of luxury. I grant some pragmatism here.
What have you got?