         it "opens an add dialog with the file's current directory path populated", ->
           expect(addDialog).toExist()
           expect(addDialog.promptText.text()).toBeTruthy()
-          expect(atom.project.relativize(dirPath)).toMatch(/[^\/]$/)
-          expect(addDialog.miniEditor.getText()).toBe(atom.project.relativize(dirPath) + "/")
+          expect(atom.project.relativize(dirPath)).toMatch(/[^\\\/]$/)
+          expect(addDialog.miniEditor.getText()).toBe(atom.project.relativize(dirPath) + path.sep)
           expect(addDialog.miniEditor.getEditor().getCursorBufferPosition().column).toBe addDialog.miniEditor.getText().length
           expect(addDialog.miniEditor.isFocused).toBeTruthy()
 
-        describe "when the path without a trailing '/' is changed and confirmed", ->
+        describe "when the path without a trailing '#{path.sep}' is changed and confirmed", ->
           describe "when no directory exists at the given path", ->
             it "adds a directory and closes the dialog", ->
               treeView.attachToDom()
-              newPath = path.join(dirPath, "new/dir")
-              addDialog.miniEditor.insertText("new/dir")
+              newPath = path.join(dirPath, 'new', 'dir')
+              addDialog.miniEditor.insertText("new#{path.sep}dir")
               addDialog.trigger 'core:confirm'
               expect(fs.isDirectorySync(newPath)).toBeTruthy()
               expect(addDialog.parent()).not.toExist()

              expect(addDialog).toHaveClass('error')
              expect(addDialog.hasParent()).toBeTruthy()

        describe "when the path with a trailing '/' is changed and confirmed", ->
          it "shows an error message and does not close the dialog", ->
            addDialog.miniEditor.insertText("new-test-file/")
            addDialog.trigger 'core:confirm'

            expect(addDialog.errorMessage.text()).toContain 'names must not end with'

              expect(atom.workspaceView.getActiveView().isFocused).toBeFalsy()
              expect(dirView.find('.directory.selected:contains(new)').length).toBe 1

        describe "when the path with a trailing '#{path.sep}' is changed and confirmed", ->
          describe "when no directory exists at the given path", ->
            it "adds a directory and closes the dialog", ->
              treeView.attachToDom()
              newPath = path.join(dirPath, 'new', 'dir')
              addDialog.miniEditor.insertText("new#{path.sep}dir#{path.sep}")
              addDialog.trigger 'core:confirm'
              expect(fs.isDirectorySync(newPath)).toBeTruthy()
              expect(addDialog.parent()).not.toExist()
