       nestedDir = path.join(otherTempDirPath, "nested-dir")
       fs.mkdirSync(nestedDir)
 
-      runAtom [tempDirPath, otherTempDirPath], {ATOM_HOME: AtomHome}, (client) ->
+      runAtom [tempDirPath, otherTempDirPath], {ATOM_HOME: atomHome}, (client) ->
         client
           .waitForExist("atom-workspace", 5000)
           .treeViewRootDirectories()


  describe "reopening a directory that was previously opened", ->
    it "remembers the state of the window", ->
      runAtom [tempDirPath], {ATOM_HOME: AtomHome}, (client) ->
        client
          .waitForExist("atom-workspace", 5000)
          .waitForPaneItemCount(0, 3000)


          # Opening one of those directories again reuses the same window and
          # does not change the project paths.
          .startAnotherAtom([nestedDir], ATOM_HOME: atomHome)
          .waitForExist("atom-workspace", 5000)
          .treeViewRootDirectories()
          .then ({value}) -> expect(value).toEqual([tempDirPath, otherTempDirPath])
