diff --git a/spec/app/text-buffer-spec.coffee b/spec/app/text-buffer-spec.coffee index 71abdbc20..91fb5cf5f 100644 --- a/spec/app/text-buffer-spec.coffee +++ b/spec/app/text-buffer-spec.coffee @@ -1,6 +1,7 @@ Project = require 'project' Buffer = require 'text-buffer' fsUtils = require 'fs-utils' +path = require 'path' _ = require 'underscore' describe 'TextBuffer', -> diff --git a/spec/fixtures/git/working-dir/file.txt b/spec/fixtures/git/working-dir/file.txt index ffc8218bd..66dc9051d 100644 --- a/spec/fixtures/git/working-dir/file.txt +++ b/spec/fixtures/git/working-dir/file.txt @@ -1 +1 @@ -Full of text \ No newline at end of file +undefined \ No newline at end of file diff --git a/spec/stdlib/fs-utils-spec.coffee b/spec/stdlib/fs-utils-spec.coffee index 25a361b90..6c62a0631 100644 --- a/spec/stdlib/fs-utils-spec.coffee +++ b/spec/stdlib/fs-utils-spec.coffee @@ -52,25 +52,25 @@ describe "fsUtils", -> it "calls fn for every path in the tree at the given path", -> paths = [] - onPath = (path) -> - paths.push(path) + onPath = (childPath) -> + paths.push(childPath) true fsUtils.traverseTreeSync fixturesDir, onPath, onPath expect(paths).toEqual fsUtils.listTree(fixturesDir) it "does not recurse into a directory if it is pruned", -> paths = [] - onPath = (path) -> - if path.match(/\/dir$/) + onPath = (childPath) -> + if childPath.match(/\/dir$/) false else - paths.push(path) + paths.push(childPath) true fsUtils.traverseTreeSync fixturesDir, onPath, onPath expect(paths.length).toBeGreaterThan 0 - for path in paths - expect(path).not.toMatch /\/dir\// + for filePath in paths + expect(filePath).not.toMatch /\/dir\// it "returns entries if path is a symlink", -> symlinkPath = path.join(fixturesDir, 'symlink-to-dir') diff --git a/src/packages/symbols-view/lib/symbols-view.coffee b/src/packages/symbols-view/lib/symbols-view.coffee index ff63aa619..6c1bf1f7e 100644 --- a/src/packages/symbols-view/lib/symbols-view.coffee +++ b/src/packages/symbols-view/lib/symbols-view.coffee @@ -42,10 +42,10 @@ class SymbolsView extends SelectList @attach() populateFileSymbols: -> - path = rootView.getActiveView().getPath() + filePath = rootView.getActiveView().getPath() @list.empty() @setLoading("Generating symbols...") - new TagGenerator(path).generate().done (tags) => + new TagGenerator(filePath).generate().done (tags) => if tags.length > 0 @maxItem = Infinity @setArray(tags)