             expect(treeView).toHaveFocus()
 
           it "doesn't open the file in the active pane", ->
-            expect(atom.views.getView(firstPane)).toHaveFocus()
+            expect(atom.views.getView(treeView)).toHaveFocus()
             expect(activePaneItem.getPath()).toBe atom.project.getDirectories()[0].resolve('tree-view.js')
 
       describe "when a file is double-clicked", ->
+        beforeEach ->
+          atom.config.set "tree-view.alwaysOpenExisting", true
         activePaneItem = null
 
         beforeEach ->


          treeView.focus()

          waitsForWindowOpen ->
            sampleTxt.trigger clickEvent(originalEvent: {detail: 1})
            sampleTxt.trigger clickEvent(originalEvent: {detail: 2})

          runs ->
            activePaneItem = atom.workspace.getActivePaneItem()


      disposable.dispose()
      done()
    causeFileToOpen()

clickEvent = (properties) ->
  event = $.Event('click')
