lib/application-stub.js
function(behaviorName, context) {
				var behaviorData = behaviors[behaviorName];
				if (behaviorData) {
					// getElement on behaviors must be stubbed
					if (!context.getElement) {
						context.getElement = function() {
							throw new Error('You must stub `getElement` for behaviors.');
						};
					}
					return behaviors[behaviorName].creator(context);
				}
				return null;
			}
function(behaviorName, context) {
				var behaviorData = behaviors[behaviorName];
				if (behaviorData) {
					// getElement on behaviors must be stubbed
					if (!context.getElement) {
						context.getElement = function() {
							throw new Error('You must stub `getElement` for behaviors.');
						};
					}
					return behaviors[behaviorName].creator(context);
				}
				return null;
			}
function ( behaviorName , context ) { var behaviorData = behaviors [ behaviorName ] ; if ( behaviorData ) { // getElement on behaviors must be stubbed if ( ! context . getElement ) { context . getElement = function ( ) { throw new Error ( 'You must stub `getElement` for behaviors.' ) ; } ; } return behaviors [ behaviorName ] . creator ( context ) ; } return null ; }
Will create a new instance of a behavior with a given context
@param {string} behaviorName The name of the behavior being created
@param {Object} context The context object (usually a TestServiceProvider)
@returns {?Object} The behavior object
Will create a new instance of a behavior with a given context