title: How to test a React ref with a callback?
body: <p>Enzyme docs contains how to test a node having <code>ref</code> with <code>wrapper.ref('nameOfRef')</code>, but this only works for refs having just a string value like, if I have a node in React:</p>
  
  <pre><code>&lt;span ref="secondRef" amount={4}&gt;Second&lt;/span&gt;
  </code></pre>
  
  <p>Then its test would be written like:</p>
  
  <pre><code>expect(wrapper.ref('secondRef').prop('amount')).to.equal(4);
  </code></pre>
  
  <p>But if I have a ref with a callback, then how to test it? Enzyme docs [1] does not says anything about this. For example, if I have a node with a ref like this:</p>
  
  <pre><code>&lt;SomeCustomReactElement ref={_form =&gt; form = _form} /&gt;
  </code></pre>
  
  <p>Thanks for guidance.</p>
  
  <p><code>[1]: http://airbnb.io/enzyme/docs/api/ReactWrapper/ref.html</code></p>