cjohansen/Sinon.JS — pull request #449 by deltaidea (2014-04-03 21:37:02+00:00)
Title: Fix wrapMethod error handling

`sinon.wrapMethod` was actually failing with this error when the property wasn't defined:
`"Cannot read property 'restore' of undefined"`

It tried to access `wrappedMethod.restore` despite results of previous check if the `wrappedMethod` is a function.

This commit fixes this issue and the corresponding test.