soap-stub.js
function createRespondingStub(object, body) {
  return function() {
    this.args.forEach(function(argSet) {
      setTimeout(argSet[1].bind(null, null, object));
    });
    this.yields(null, object, body);
  };
}
function createRespondingStub(object, body) {
  return function() {
    this.args.forEach(function(argSet) {
      setTimeout(argSet[1].bind(null, null, object));
    });
    this.yields(null, object, body);
  };
}
function createRespondingStub ( object , body ) { return function ( ) { this . args . forEach ( function ( argSet ) { setTimeout ( argSet [ 1 ] . bind ( null , null , object ) ) ; } ) ; this . yields ( null , object , body ) ; } ; }
Returns a method that calls all callbacks given to the method it is attached
to with the given response.

<pre>
myClientStub.someMethod.respondWithError = createRespondingStub(errorResponse);

// elsewhere

myClientStub.someMethod.respondWithError();
</pre>

@param {?} object anything
@return {Function}
Returns a method that calls all callbacks given to the method it is attached to with the given response .