       driver.wait ->
         driver.getTitle().then (title) -> title.indexOf("Atom") >= 0
 
-  startAnotherAtom = (args=[]) ->
+  startAnotherAtom = (args...) ->
     spawnSync(AtomPath, args.concat([
       "--dev",
       "--safe",


      # Opening a different directory creates a new window.
      waitsForPromise ->
        startAnotherAtom([temp.mkdirSync("another-empty-dir")])
        driver.wait ->
          driver.getAllWindowHandles().then (handles) ->
            handles.length is 2

  describe "when given the name of a directory that exists", ->
    beforeEach ->
      startAtom([tempDirPath])

    it "opens a new window no text editors open", ->
      waitsForPromise ->

  afterEach ->
    waitsForPromise -> driver.quit().thenFinally(-> chromeDriver.kill())

  startAtom = (args...) ->
    driver = new Builder()
      .usingServer("http://localhost:#{ChromeDriverPort}")
      .withCapabilities(
