lib/stub.js
// spy but restore after one call
spy but restore after one call
spy but restore after one call
function spyOnce( objectOrFunction, methodName, overrideMethod ) {
    var _spy = stub.spy(objectOrFunction, methodName, overrideMethod)
        .configure('saveLimit', 10)
        .configure('restoreAfterCalls', 1);
    return _spy;
}
function spyOnce ( objectOrFunction , methodName , overrideMethod ) { var _spy = stub . spy ( objectOrFunction , methodName , overrideMethod ) . configure ( 'saveLimit' , 10 ) . configure ( 'restoreAfterCalls' , 1 ) ; return _spy ; }
spy but restore after one call
spy but restore after one call