From 6dcbdfbf55ecaf84411f889c851a4be9af564928 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 8 Oct 2012 20:21:12 -0700 Subject: [PATCH] Update fs spec for new traverseTree callback format --- spec/stdlib/fs-spec.coffee | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/spec/stdlib/fs-spec.coffee b/spec/stdlib/fs-spec.coffee index afc17089c..49287b3ae 100644 --- a/spec/stdlib/fs-spec.coffee +++ b/spec/stdlib/fs-spec.coffee @@ -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