redding/assert — pull request #198 by jcredding (2014-06-27 19:48:23+00:00)
Title: Handle stub args whose `hash` changes

This updates the stub `call` logic to `rehash` its `Hash` when
it can't find a matching stub for a set of args. The goal of this
is to fix a bug with args whose `hash` changes after they have
been used in a stub. When this happens, a `Hash` can't reliably
find the object. In practice, a method would be stubbed, some code
would execute that modifies the `hash` of the args and then when
the stub was called, it would raise an error saying there wasn't
a matching stub.

This also changes the exception classes that are thrown. With this
change, the rescue needs to only rescue not stubbed errors and not
the arity mismatch errors. There is now a not stubbed error and
an arity error and they are thrown for their specific scenarios.

@kellyredding - Ready for review.