anchor.diff:  
   	<cfset variables.WHEELS_TESTS_BASE_COMPONENT_PATH = "">
   	<cfset global = {}>
  -
  +	
   	<!---
  -		Instanciate all components in specified package and call their runTest()
  +		Called from a test function.  If expression evaluates to false,
  +		record a failure against the test.
  +
  +		@param	expression	String containing CFML expression to evaluate
  +		@param	2..n		Optional. String(s) containing space-delimited list
  +							of variables to evaluate and include in the
  +							failure message to help determine cause of failed
  +							assertion.
  +	--->
  +	<cffunction name="assert" returntype="void" output="false" hint="evaluates an expression">
  +		<cfargument type="string" name="expression" required=true>
  +
  +		<cfset var token = "">
  +		<cfset var tokenValue = "">
  +		<cfset var message = "assert failed: #expression#">
  +		<cfset var newline = chr(10) & chr(13)>
  +		<cfset var i = "">
  +		<cfset var evaluatedTokens = "">
  +
  +		<cfif not evaluate(expression)>
  +
  +			<cfloop from="1" to="#arrayLen(arguments)#" index="i">
  +
  +				<cfset expression = arguments[i]>
  +				<cfset evaluatedTokens = structNew()>
  +
  +				<!---
  +					Double pass of expressions with different delimiters so that for expression "a(b) or c[d]",
  +					"a(b)", "c[d]", "b" and "d" are evaluated.  Do not evaluate any expression more than once.
  +				--->
  +				<cfloop list="#expression# #reReplace(expression, "[([\])]", " ")#" delimiters=" +=-*/%##" index="token">
  +
  +					<cfif not structKeyExists(evaluatedTokens, token)>
  +
  +						<cfset evaluatedTokens[token] = true>
  +						<cfset tokenValue = "__INVALID__">
  +
  +						<cfif not (isNumeric(token) or isBoolean(token))>
  +
  +							<cftry>
  +								<cfset tokenValue = evaluate(token)>
  +							<cfcatch type="expression"/>
  +							</cftry>
  +
  +						</cfif>
  +
  +						<!---
  +							Format token value according to type
  +						--->
  +						<cfif (not isSimpleValue(tokenValue)) or (tokenValue neq "__INVALID__")>
  +
  +							<cfif isSimpleValue(tokenValue)>
  +								<cfif not (isNumeric(tokenValue) or isBoolean(tokenValue))>
  +									<cfset tokenValue ="'#tokenValue#'">
  +								</cfif>
  +							<cfelse>
  +								<cfif isArray(tokenValue)>
  +									<cfset tokenValue = "array of #arrayLen(tokenValue)# items">
  +								<cfelseif isStruct(tokenValue)>
  +									<cfset tokenValue = "struct with #structCount(tokenValue)# members">
  +								</cfif>
  +							</cfif>
  +
  +							<cfset message = message & newline & token & " = " & tokenValue>
  +
  +						</cfif>
  +
  +					</cfif>
  +
  +				</cfloop>
  +
  +			</cfloop>
  +
  +			<cfset fail(message)>
  +
  +		</cfif>
  +
  +	</cffunction>
  +
  +	<!---
  +		Called from a test function to cause the test to fail.
  +
  +		@param message	Message to record in test results against failure.
  +	--->
  +	<cffunction name="fail" returntype="void" hint="will throw an exception resulting in a test failure along with an option message.">
  +		<cfargument type="string" name="message" required="false" default="">
  +
  +		<!---
  +			run() interprets exception with this errorcode as a "Failure".
  +			All other errorcodes cause are interpreted as an "Error".
  +		--->
  +		<cfthrow errorcode="__FAIL__" message="#HTMLEditFormat(message)#">
  +
  +	</cffunction>
  +
  +	<cffunction name="halt" returntype="Any" output="false" hint="used to dump an expression and halt testing. Useful when you want to see what an expression will output first so you can write tests for it.">
  +		<cfargument name="halt" type="boolean" required="true" hint="should we halt. true will halt and dump output. false will just return so tests can continue">
  +		<cfargument name="expression" type="string" required="true" hint="the expression you want to see output for">
  +
  +		<cfif not arguments.halt>
  +			<cfreturn>
  +		</cfif>
  +
  +		<cfdump var="#evaluate(arguments.expression)#"><cfabort>
  +	</cffunction>
  +	
  +	<cffunction name="raised" returntype="string" output="false" hint="catches an raised error and returns the error type. great if you want to test that a certain exception will be raised.">
  +		<cfargument type="string" name="expression" required="true">
  +		<cftry>
  +			<cfset evaluate(arguments.expression)>
  +			<cfcatch type="any">
  +				<cfreturn trim(cfcatch.type)>
  +			</cfcatch>
  +		</cftry>
  +		<cfreturn "">
  +	</cffunction>
  +
  +	<cffunction name="loadModels" hint="allows you to load all or specific models into the test case">
  +		<cfargument name="models" type="string" required="false" default="" hint="a comma delimited list of the model you want to load. leave blank to load all models.">
  +		<cfset var loc = {}>
  +		
  +		<cfif not structkeyexists(variables, "model")>
  +			<cfinclude template="/wheelsMapping/global/functions.cfm">
  +		</cfif>
  +		
  +		<cfif !len(arguments.models)>
  +			<cfdirectory action="list" directory="#expandpath(application.wheels.modelPath)#" name="loc.models" filter="*.cfc" type="file">
  +			<cfset arguments.models = valuelist(loc.models.name)>
  +		</cfif>
  +		
  +		<cfloop list="#arguments.models#" index="loc.model">
  +			<cfset global[singularize(listfirst(loc.model, "."))] = model(listfirst(loc.model, "."))>
  +		</cfloop>
  +	</cffunction>
  +
  +	<!---
  +		Instanciate all components in specified package and call their $runTest()
   		method.
   
   		@param testPackage	Package containing test components
  
positive.code: 							request scope, defaults to "test"
  		@returns true if no errors
  	--->
  	<cffunction returntype="boolean" name="runTest" output="true">
  		<cfargument name="resultKey" type="string" required="false" default="test">
  
  		<cfset var key = "">
  
negative.code: 
  	</cffunction>
  
  	<!--- WheelsRunner --->
  	<cffunction name="$WheelsRunner" returntype="string" output="false">
  		<cfargument name="options" type="struct" required="false" default="#structnew()#">
  		<cfset var loc = {}>
  		<cfset var q = "">
  