title: Expected a spy, but got Function
body: <p>I am trying to implement a test (1) for this  module (2).<br>
  My purpose is to check if the collection is fetched when a particular event is triggered.<br>
  As you can see from my comment in (2) I get the message  <code>Error: Expected a spy, but got Function.</code><br>
  The module works but the test fails. any ideas?   </p>
  
  <hr>
  
  <p>(1)</p>
  
  <pre><code>// jasmine test module
  
  describe('When onGivePoints is fired', function () {
      beforeEach(function () {
          spyOn(this.view.collection, 'restartPolling').andCallThrough();
          app.vent.trigger('onGivePoints');
      });
      it('the board collection should be fetched', function () {
          expect(this.view.collection.restartPolling).toHaveBeenCalled();
         // Error: Expected a spy, but got Function.
      });
  });
  </code></pre>
  
  <hr>
  
  <p>(2)</p>
  
  <pre><code>// model view module
  return Marionette.CompositeView.extend({
      initialize: function () {
          this.collection = new UserBoardCollection();
          this.collection.startPolling();
          app.vent.on('onGivePoints', this.collection.restartPolling);
      },
      // other code
  });
  </code></pre>