var React = require('react'),
    Parent = React.createFactory(require('../../../src/components/parent.jsx')),
    TestUtils = require('react/addons').addons.TestUtils,
    TestHelpers = require('../../helpers.js'),
    $ = require('jquery');


describe('Parent', function() {
  var component;
  var doStuffStub;


  beforeEach(function() {
    doStuffStub = TestHelpers.stubMethod(Parent, 'doStuff');

    component = React.render(Parent(), this.container);
  });

  it('should call to do stuff', function() {
    TestUtils.Simulate.click(component.refs.btn.getDOMNode());
    expect(doStuffStub).to.have.been.called;
  });

  it('should render stuff', function() {
    expect($(component.refs.stuff.getDOMNode()).text()).to.equal('tomato');
  });
});



@@ -304,18 +304,33 @@
 tuffStub
+, loadChildStub
 ;%0A
-
 %0A%0A  befo
@@ -345,24 +345,95 @@
 unction() %7B%0A
+    loadChildStub = TestHelpers.stubMethod(Parent, 'loadChild', null);%0A
     doStuffS
@@ -653,16 +653,17 @@
 ode());%0A
+%0A
     expe
@@ -743,24 +743,24 @@
 unction() %7B%0A
-
     expect($
@@ -828,15 +828,125 @@
 );%0A  %7D);
+%0A%0A  it('should render a child', function() %7B%0A    expect(loadChildStub).to.have.been.calledWith('child');%0A  %7D);
 %0A%7D);%0A%0A%0A

Test that Parent renders Child