 temp = require('temp').track()
 os = require 'os'
 eventHelpers = require "./event-helpers"
-{getFullExtension} = require "../lib/helpers"
 
 waitsForFileToOpen = (causeFileToOpen) ->
   waitsFor (done) ->

                atom.commands.dispatch(treeView.element, "tree-view:paste")
                atom.commands.dispatch(treeView.element, "tree-view:paste")

                extension = getFullExtension(dotFilePath)
                file = path.join(path.dirname(dotFilePath), path.basename(dotFilePath, extension))

                numberedFileName0 = "#{file}0#{extension}"
                numberedFileName1 = "#{file}1#{extension}"
                expect(fs.existsSync(numberedFileName0)).toBeTruthy()
                expect(fs.existsSync(numberedFileName1)).toBeTruthy()
                expect(fs.existsSync(dotFilePath)).toBeTruthy()

        describe "when a directory is selected", ->

              atom.commands.dispatch(treeView.element, "tree-view:paste")
              atom.commands.dispatch(treeView.element, "tree-view:paste")

              expect(fs.existsSync(path.join(path.dirname(filePath), "test-file0.txt"))).toBeTruthy()
              expect(fs.existsSync(path.join(path.dirname(filePath), "test-file1.txt"))).toBeTruthy()
              expect(fs.existsSync(filePath)).toBeTruthy()

        describe "when a file containing two or more periods has been copied", ->
