title: Why is this sinon spy not being called when I run this test?
body: <p>I have a Backbone Model:</p>
  
  <pre><code>class DateTimeSelector extends Backbone.Model
  
    initialize: -&gt;
      @bind 'change:date', @updateDatetime
      @bind 'change:time', @updateDatetime
  
    updateDatetime: =&gt;
      # do some stuff with the sate and time
  </code></pre>
  
  <p>And I have some tests for that code using <a href="http://pivotal.github.com/jasmine/" rel="noreferrer">jasmin</a> and <a href="http://sinonjs.org/docs/#sinonspy" rel="noreferrer">sinon.js</a></p>
  
  <pre><code>describe "DateTimeSelector", -&gt;
    beforeEach -&gt;
      @datetime = new DateTimeSelector()
  
      describe "updateDatetime", -&gt;
        beforeEach -&gt;
          @updateSpy = sinon.spy(@datetime, 'updateDatetime')
  
        afterEach -&gt;
          @datetime.updateDatetime.restore()
  
        # passes
        it "should be called when we call it", -&gt;
          @datetime.updateDatetime()
          expect(@updateSpy).toHaveBeenCalledOnce()
  
        # fails
        it "should be called when we trigger it", -&gt;
          @datetime.trigger 'change:date'
          expect(@updateSpy).toHaveBeenCalled()
  
        # fails
        it "should be called when we set the date", -&gt;
          @datetime.set { date: new Date() }
          expect(@updateSpy).toHaveBeenCalled()
  </code></pre>
  
  <p>It seems to work when I use it in the browser but I can't seem to get the tests to pass. Can anyone enlighten me?</p>