title: sinon stub error "attempted to wrap undefined property of job as function"
body: <p>I am trying to use sinon stub to test my function that contains two variables called job and job1. How to give temporary values to them to avoid function values.</p>
  
  <p>In one of the file myFunction.js I have functions like</p>
  
  <pre><code>function testFunction() {
    var job = this.win.get.value1   //test
    var job1 = this.win.get.value2 // test1
    if(job === 'test' &amp;&amp; job1 === 'test1') {
      return true;
    }
      return false; 
  }
  </code></pre>
  
  <p>and I am trying to test testFunction using karma and I tried to stub two values with my values so it can override the function values</p>
  
  <pre><code>it('should test my function', function(done) {
    var stub = sinon.stub('job','job1').values('test','test1');
    myFunction.testFunction('test', function(err, decodedPayload) {
      decodedPayload.should.equal(true);
      done();
    });
  });
  </code></pre>
  
  <p>I am getting error "attemted to wrap undefined property of job as function"</p>