title: Spying on a constructor in javascript with sinon
body: <p>I am trying to create a spy on a constructor, and see if it gets called -- below are my tests.
  I'm using sinon-chai so the syntax is valid, but both tests fail.</p>
  
  <pre><code>var foo = function(arg) {
  };
  
  var bar = function(arg) {
      var baz = new foo(arg);
  };
  
  it('foo initialized inside of this test', function() {
      var spy = sinon.spy(foo);
      new foo('test');
      expect(spy).to.be.called;
      expect(spy).to.be.calledWith('test');
  });
  it('foo initialized by bar()', function() {
      var spy = sinon.spy(foo);
      bar('test');
      expect(spy).to.be.called;
      expect(spy).to.be.calledWith('test');
  });
  </code></pre>