           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")

        expect(rootView.getActiveView()).toBe editor2
        rootView.trigger 'fuzzy-finder:toggle-file-finder'

        expectedPath = project.resolve('dir/a')
        finderView.confirmed(expectedPath)

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