           expect(rootView.getActiveView()).toBe editor1
 
           expectedPath = project.resolve('sample.txt')
-          finderView.confirmed('sample.txt')
+          finderView.confirmed(expectedPath)
 
           expect(finderView.hasParent()).toBeFalsy()
           expect(editor1.getPath()).toBe expectedPath


      runs ->
        expect(finderView).not.toBeVisible()
        expect(openedPath).toBe "sample.txt"

    it "displays an error when the word under the cursor doesn't match any files", ->
      editor.setText("moogoogaipan")

      describe "when the active pane has an item for the selected path", ->
        it "switches to the item for the selected path", ->
          expectedPath = project.resolve('sample.txt')
          finderView.confirmed(expectedPath)

          expect(finderView.hasParent()).toBeFalsy()
          expect(editor1.getPath()).not.toBe expectedPath
