> What I don't understand is where my logic has gone wrong and why Daniel's
> proposal is preferred.
>

The logic is fine, but:
1) We've got some learned skittishness on relying on mocha for this
sort of thing
2) If your problem is that you're over-catching exceptions, raising an
exception when you notice, well, that exception might also get
swallowed
3) There's a bug in mocha (that I've tried unsuccessfully to patch)
where foo.expects(:method).never doesn't increment the called_count,
instead producing an exception that we sometimes mistakenly swallow
4) If we have an invariant-check at the end of the test, it catches
when we get bitten by any of the above, and it doesn't preclude us
from also adding early-fail logic.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to