       mkdirp fixturePath("tmp"), ->
         proceed()
 
+  "gatherApplicationRoots returns directories and symlinks to directories": (test) ->
+    test.expect 1
+    configuration = new Configuration root: fixturePath("configuration")
+    configuration.gatherApplicationRoots (err, roots) ->
+      test.same roots,
+        "directory":            fixturePath("configuration/directory")
+        "www.directory":        fixturePath("configuration/www.directory")
+        "symlink-to-directory": fixturePath("apps/hello")
+        "symlink-to-symlink":   fixturePath("apps/hello")
+      test.done()
+
   "gatherApplicationRoots with non-existent root": (test) ->
     test.expect 2
     configuration = new Configuration root: fixturePath("tmp/pow")

        test.ok stat.isDirectory()
        test.done()

  "gatherApplicationRoots returns directories and symlinks to directories": (test) ->
    test.expect 1
    configuration = new Configuration root: fixturePath("configuration")
    configuration.gatherApplicationRoots (err, roots) ->
      test.same roots,
        'directory':            fixturePath('configuration/directory')
        'symlink-to-directory': fixturePath('apps/hello')
        'symlink-to-symlink':   fixturePath('apps/hello')
      test.done()

{exec}     = require "child_process"
fs         = require "fs"
{join}     = require "path"
async      = require "async"
{testCase} = require "nodeunit"

Configuration = require "pow/configuration"
