Fix fuzzy specs

This commit is contained in:
Garen Torikian 2013-03-28 13:04:25 -07:00
parent 9e3935f349
commit 226611d2ec
3 changed files with 5 additions and 5 deletions

View File

@ -13,7 +13,7 @@
"coffee-cache": "0.1.0",
"pegjs": "0.7.0",
"async": "0.2.6",
"nak": "0.2.4",
"nak": "0.2.5",
"spellchecker": "0.2.0",
"plist": "git://github.com/nathansobo/node-plist.git",
"space-pen": "git://github.com/nathansobo/space-pen.git"

View File

@ -18,7 +18,7 @@ class LoadPathsTask
args = ['-l', rootPath]
args.unshift("--addVCSIgnores") if config.get('nak.addVCSIgnores')
args.unshift("-d", "#{ignoredNames.join(',')}") if ignoredNames.length > 0
paths = []
deferred = $.Deferred()
exit = (code) =>
@ -28,7 +28,7 @@ class LoadPathsTask
@callback(paths)
deferred.resolve()
stdout = (data) ->
paths = paths.concat(data.split("\n"))
paths = paths.concat(_.compact(data.split("\n")))
new BufferedProcess({command, args, stdout, exit})
deferred

View File

@ -365,7 +365,7 @@ describe 'FuzzyFinder', ->
expect(finderView).toBeVisible()
expect(rootView.find('.fuzzy-finder input:focus')).toExist()
it "opens a file directly when there is a single match", ->
fit "opens a file directly when there is a single match", ->
editor.setText("sample.txt")
jasmine.unspy(window, "setTimeout")
rootView.trigger 'fuzzy-finder:find-under-cursor'
@ -379,7 +379,7 @@ describe 'FuzzyFinder', ->
runs ->
expect(finderView).not.toBeVisible()
expect(openedPath).toBe "sample.txt"
expect(openedPath).toBe "#{project.getPath()}/sample.txt"
it "displays an error when the word under the cursor doesn't match any files", ->
editor.setText("moogoogaipan")