       tempFilePath = path.join(temp.mkdirSync("a-third-dir"), "a-file")
       fs.writeFileSync(tempFilePath, "This file was already here.")
 
-      runAtom [path.join(tempDirPath, "new-file")], {ATOM_HOME: AtomHome}, (client) ->
+      runAtom [path.join(tempDirPath, "new-file")], {ATOM_HOME: atomHome}, (client) ->
         client
           .waitForWindowCount(1, 1000)
           .waitForExist("atom-workspace", 5000)


          # Opening another file reuses the same window and does not change the
          # project paths.
          .startAnotherAtom([tempFilePath], ATOM_HOME: AtomHome)
          .waitForPaneItemCount(2, 5000)
          .waitForWindowCount(1, 1000)
          .treeViewRootDirectories()


          # Opening another directory creates a second window.
          .waitForNewWindow(->
            @startAnotherAtom([otherTempDirPath], ATOM_HOME: atomHome)
          , 5000)
          .waitForExist("atom-workspace", 5000)
          .waitForPaneItemCount(0, 1000)
