anchor.diff:     * The function wheels uses to run tests
      */
     public any function $wheelsRunner(struct options={}) {
  -  	var loc = {};
     	// the key in the request scope that will contain the test results
  -  	loc.resultKey = "WheelsTests";
  +  	local.resultKey = "WheelsTests";
   
       // save the original environment for overloading
  -    loc.wheelsApplicationScope = Duplicate(application);
  +    local.wheelsApplicationScope = Duplicate(application);
       // to enable unit testing controllers without actually performing the redirect
       set(functionName="redirectTo", delay=true);
   
     	// not only can we specify the package, but also the test we want to run
  -  	loc.test = "";
  +  	local.test = "";
     	if (StructKeyExists(arguments.options, "test") && Len(arguments.options.test)) {
  -  		loc.test = arguments.options.test;
  +  		local.test = arguments.options.test;
     	}
  -  	loc.paths = $resolvePaths(arguments.options);
  -  	loc.packages = $listTestPackages(arguments.options, loc.paths.test_filter);
  +  	local.paths = $resolvePaths(arguments.options);
  +  	local.packages = $listTestPackages(arguments.options, local.paths.test_filter);
   
       // run tests
  -    loc.i = 0;
  -    for (loc.row in loc.packages) {
  -      loc.i++;
  -  		loc.instance = CreateObject("component", loc.row.package);
  +    local.i = 0;
  +    for (local.row in local.packages) {
  +      local.i++;
  +  		local.instance = CreateObject("component", local.row.package);
         // is there a better way to check for existence of a function?
         // if the beforeall method is present, run it once only per request
  -      if (StructKeyExists(loc.instance, "beforeAll") && loc.i eq 1) {
  -        loc.instance.beforeAll();
  +      if (StructKeyExists(local.instance, "beforeAll") && local.i eq 1) {
  +        local.instance.beforeAll();
         }
  -      if (StructKeyExists(loc.instance, "packageSetup")) {
  -        loc.instance.packageSetup();
  +      if (StructKeyExists(local.instance, "packageSetup")) {
  +        local.instance.packageSetup();
         }
  -      loc.instance.$runTest(loc.resultKey, loc.test);
  -      if (StructKeyExists(loc.instance, "packageTeardown")) {
  -        loc.instance.packageTeardown();
  +      local.instance.$runTest(local.resultKey, local.test);
  +      if (StructKeyExists(local.instance, "packageTeardown")) {
  +        local.instance.packageTeardown();
         }
         // if the afterAll method is present, run it after the last package (once per request)
  -      if (StructKeyExists(loc.instance, "afterAll") && loc.i eq loc.packages.recordCount) {
  -        loc.instance.afterAll();
  +      if (StructKeyExists(local.instance, "afterAll") && local.i eq local.packages.recordCount) {
  +        local.instance.afterAll();
         }
     	};
       // swap back the enviroment
  -  	StructAppend(application, loc.wheelsApplicationScope, true);
  +  	StructAppend(application, local.wheelsApplicationScope, true);
     	// return the results
  -  	return $results(loc.resultKey);
  +  	return $results(local.resultKey);
     }
   
     /*
  
positive.code:    */
    public struct function $resolvePaths(struct options={}) {
  
      var loc = {};
      loc.rv = {};
  
      // default test type
      loc.type = "core";
      // testfilter
      loc.rv.test_filter = "*";
      // by default we run all packages, however they can specify to run a specific package of tests
      loc.package = "";
  
      // if they specified a package we should only run that
    	if (StructKeyExists(arguments.options, "package") && Len(arguments.options.package)) {
    		loc.package = arguments.options.package;
    	}
      // overwrite the default test type if passed
    	if (structkeyexists(arguments.options, "type") and len(arguments.options.type)) {
    		loc.type = arguments.options.type;
    	}
  
      // which tests to run
      if (loc.type eq "core") {
        // core tests
        TESTING_FRAMEWORK_VARS.ROOT_TEST_PATH = application.wheels.wheelsComponentPath;
      } else if (loc.type eq "app") {
        // app tests
        TESTING_FRAMEWORK_VARS.ROOT_TEST_PATH = application.wheels.rootComponentPath;
      } else {
        // specific plugin tests
        TESTING_FRAMEWORK_VARS.ROOT_TEST_PATH = application.wheels.rootComponentPath;
        TESTING_FRAMEWORK_VARS.ROOT_TEST_PATH = ListAppend(TESTING_FRAMEWORK_VARS.ROOT_TEST_PATH, "#application.wheels.pluginComponentPath#.#loc.type#", ".");
      }
  
      TESTING_FRAMEWORK_VARS.ROOT_TEST_PATH = ListAppend(TESTING_FRAMEWORK_VARS.ROOT_TEST_PATH, "tests", ".");
  
      // add the package if specified
      loc.rv.test_path = listappend("#TESTING_FRAMEWORK_VARS.ROOT_TEST_PATH#", loc.package, ".");
  
      // clean up testpath
      loc.rv.test_path = listchangedelims(loc.rv.test_path, ".", "./\");
  
      // convert to regular path
      loc.rv.relative_root_test_path = "/" & listchangedelims(TESTING_FRAMEWORK_VARS.ROOT_TEST_PATH, "/", ".");
      loc.rv.full_root_test_path = expandpath(loc.rv.relative_root_test_path);
      loc.rv.relative_test_path = "/" & listchangedelims(loc.rv.test_path, "/", ".");
      loc.rv.full_test_path = expandPath(loc.rv.relative_test_path);
  
    	if (! DirectoryExists(loc.rv.full_test_path)) {
    		if (FileExists(loc.rv.full_test_path & ".cfc")) {
          loc.rv.test_filter = reverse(listfirst(reverse(loc.rv.test_path), "."));
          loc.rv.test_path = reverse(listrest(reverse(loc.rv.test_path), "."));
          loc.rv.relative_test_path = "/" & listchangedelims(loc.rv.test_path, "/", ".");
          loc.rv.full_test_path = expandPath(loc.rv.relative_test_path);
        } else {
          throw(
            type="Wheels.Testing",
  
negative.code:    */
    public query function $listTestPackages(struct options={}, string filter="*") {
  
      local.rv = QueryNew("package","Varchar");
  
      local.paths = $resolvePaths(arguments.options);
      $initialiseTestEnvironment(local.paths, arguments.options);
  
    	local.packages = DirectoryList(local.paths.full_test_path, true, "query", "#arguments.filter#.cfc");
    	for (local.package in local.packages) {
        local.packageName = ListChangeDelims(RemoveChars(local.package.directory, 1, Len(local.paths.full_test_path)), ".", "\/");
    		// directories that begin with an underscore are ignored
    		if (! ReFindNoCase("(^|\.)_", local.packageName)) {
          local.packageName = ListPrepend(local.packageName, local.paths.test_path, ".");
          local.packageName = ListAppend(local.packageName, ListFirst(local.package.name, "."), ".");
          // ignore invalid packages
    			if ($isValidTest(local.packageName)) {
    				QueryAddRow(local.rv);
            QuerySetCell(local.rv, "package", local.packageName);
    			}
        }
      };
      return local.rv;
    }
  
    /*
  