title: Attempting to test a React component with jasmine-react
body: <p>This question is very similar to <a href="https://stackoverflow.com/questions/24280428/stubbing-a-react-component-method-with-sinon">one of the solutions to this question</a>. </p>
  
  <p>I'm using this as my example as its similar to my real problem but nicely distilled.</p>
  
  <p>The following test produces this result:</p>
  
  <pre><code>Warning: Comp.type is deprecated. Use Comp directly to access the class.
  
   Error: Expected a spy, but got undefined.
  </code></pre>
  
  <p>The test:</p>
  
  <pre><code>it("should call plop method on render", function(){
  
        var Comp = React.createClass({
  
          displayName: "Comp",
  
          plop: function() {
            console.log("plop");
          },
  
          render: function() {
            this.plop();
            return (&lt;div&gt;&lt;/div&gt;);
          }
        });
  
  
        //spy on method
        jasmineReact.spyOnClass(Comp, "plop");
        jasmineReact.render(&lt;Comp /&gt;);
        expect(Comp.plop).toHaveBeenCalled();
      })
  </code></pre>
  
  <p>Any idea what I'm doing wrong?</p>