cjohansen/Sinon.JS — pull request #175 by nuc-gr (2012-09-21 22:50:51+00:00)
Title: Retain original expectation messages, for failed mocks under sinon.test

Dear all,

Under **sinon.test**, the expectation errors for failed mocks didn't provide the original error message.

In order to resolve this, when **invokeMethod** throws an ExpectationError instead of **verifyAndRestore** (which will send another exception, overwriting the first one), we just restore the sandbox and propagate the original exception.

There might be a more elegant way to resolve this issue, so I'm really waiting for your feedback.

Good night,

Giorgos