Right now we validate some of our proptype definitions, but we don't surface the issue until that component class is consumed. We should instead validate these, in `__DEV__` only as warnings when the class in created. This means that a call to `React.PropTypes.onOf('foo')` results in an immediate warning logged.

This is a relatively contained bit of code so would be a good candidate for somebody looking to start contributing to React.

it('should have been called even if the prop is not present', function() {
      var spy = jasmine.createSpy();
      Component = React.createClass({
        propTypes: {num: spy},
        render: function() {
          return <div />;
        },
      });
      var instance = <Component bla={5} />;
      instance = ReactTestUtils.renderIntoDocument(instance);
      expect(spy.calls.count()).toBe(1);
      expect(spy.calls.argsFor(0)[1]).toBe('num');
    });
    it('should have received the validator\'s return value', function() {
      spyOn(console, 'error');
      var spy = jasmine.createSpy().and.callFake(
        function(props, propName, componentName) {
          if (props[propName] !== 5) {
            return new Error('num must be 5!');
          }
        }
      );
      Component = React.createClass({
        propTypes: {num: spy},
        render: function() {
          return <div />;
        },
      });
      var instance = <Component num={6} />;
      instance = ReactTestUtils.renderIntoDocument(instance);