title: Jasmine - how to spyOn instance methods
body: <p>I have a function</p>
  
  <pre><code>var data = {};
  var myFunc = function() {
    data.stuff = new ClassName().doA().doB().doC();
  };
  </code></pre>
  
  <p>I'd like to test that <code>doA</code>, <code>doB</code>, and <code>doC</code> were all called.</p>
  
  <p>I tried spying on the instance methods like this</p>
  
  <pre><code>beforeEach(function() {
    spyOn(ClassName, 'doA');
  };
  it('should call doA', function() {
    myFunc();
    expect(ClassName.doA).toHaveBeenCalled();
  });
  </code></pre>
  
  <p>but that just gives me a "doA() method does not exist" error.</p>
  
  <p>Any ideas?</p>