             expect(editor3.getPath()).toBe expectedPath
             expect(atom.views.getView(editor3)).toHaveFocus()
 
-      describe "when the active pane does not have an item for the selected path", ->
-        it "adds a new item to the active pane for the selcted path", ->
+      describe "when the active pane does not have an item for the selected path and fuzzy-finder.searchAllPanes is false", ->
+        beforeEach ->
+          atom.config.set("fuzzy-finder.searchAllPanes", false)
+
+        it "adds a new item to the active pane for the selected path", ->
           dispatchCommand('toggle-buffer-finder')
 
           atom.views.getView(editor1).focus()


            expect(editor4.getPath()).toBe expectedPath
            expect(atom.views.getView(editor4)).toHaveFocus()

  describe "common behavior between file and buffer finder", ->
    describe "when the fuzzy finder is cancelled", ->

          dispatchCommand('toggle-buffer-finder')

      describe "when the active pane has an item for the selected path", ->
        beforeEach ->
          atom.config.set("fuzzy-finder.searchAllPanes", false)

        it "switches to the item for the selected path", ->
          expectedPath = atom.project.getDirectories()[0].resolve('sample.txt')
          bufferView.confirmed({filePath: expectedPath})
