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.
This updates the stub
call
logic torehash
itsHash
when it can't find a matching stub for a set of args. The goal of this is to fix a bug with args whosehash
changes after they have been used in a stub. When this happens, aHash
can't reliably find the object. In practice, a method would be stubbed, some code would execute that modifies thehash
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.