Update fs spec for new traverseTree callback format

This commit is contained in:
Kevin Sawicki
2012-10-08 20:21:12 -07:00
parent 51a41a9a72
commit 6dcbdfbf55

View File

@@ -70,16 +70,19 @@ describe "fs", ->
it "calls fn for every path in the tree at the given path", ->
paths = []
fs.traverseTree fixturesDir, (path) -> paths.push(path)
fs.traverseTree fixturesDir, (path) ->
paths.push(fs.join(fixturesDir, path))
true
expect(paths).toEqual fs.listTree(fixturesDir)
it "does not recurse into a directory if it is pruned", ->
paths = []
fs.traverseTree fixturesDir, (path, prune) ->
if path.match(/\/dir$/)
prune()
false
else
paths.push(path)
true
expect(paths.length).toBeGreaterThan 0
for path in paths