src/index.js
function Mocker(obj, methodName, mockFn) {
  this.obj = obj;
  this.methodName = methodName;
  this.originalFn = obj[methodName];
  this.history = [];
  
  //Assign new function
  mockFn = mockFn || this.originalFn;
  obj[methodName] = wrapFn(this, mockFn);
}
function Mocker(obj, methodName, mockFn) {
  this.obj = obj;
  this.methodName = methodName;
  this.originalFn = obj[methodName];
  this.history = [];
  
  //Assign new function
  mockFn = mockFn || this.originalFn;
  obj[methodName] = wrapFn(this, mockFn);
}
function Mocker ( obj , methodName , mockFn ) { this . obj = obj ; this . methodName = methodName ; this . originalFn = obj [ methodName ] ; this . history = [ ] ; //Assign new function mockFn = mockFn || this . originalFn ; obj [ methodName ] = wrapFn ( this , mockFn ) ; }
Mocker constructor

@param {Object} obj            Object to create a mock of
@param {String} methodName     Method name to mock
@param {Function} mockFn       Mock function
@return {Mocker}
@api public
Mocker constructor