 require '../../test_helper'
 fs = require 'fs'
-{resolve, existsSync} = require "path"
+{resolve} = require "path"
 
 root = resolve __dirname, '../../../'
 

  it 'should remove all the files and directories recursively', (done) ->
    fu.rm "#{root}/test/fixtures/utils/files/rm", (err) ->

      expect(existsSync "#{root}/test/fixtures/utils/files/rm").toBeFalsy()
      done()

describe 'readFiles', ->

  deep = "#{root}/test/fixtures/utils/files/foo/bar.coffee"

  afterEach ->
    fs.unlinkSync deep if fs.existsSync deep
    fs.unlinkSync base if fs.existsSync base

  describe 'when called with a valid path to the file to create', ->

    it 'should create the directory', (done) ->
      fu.touch base, (err, created) ->
        expect(fs.existsSync base).toBeTruthy()
        expect(created).toBeTruthy()
        done()

