 
 
   # path.write
+  describe 'write should return error for directory', ->
+
+    it '(async)', (done) ->
+
+      buildPath().write 'testing', (error) ->
+        assert.equal error?.error, 'write() requires non-directory'
+        done()
+
+    it '(sync)', ->
+
+      result = buildPath().write()
+      assert.equal result?.error, 'write() requires non-directory'
+
+
   describe 'sync write', -> it 'should write file \'path.sync.write.txt\'', ->
     testFile = 'test/output/path.sync.write.txt'
     testContent = 'output by path.write test'

    it 'with correct regex should return true',  -> assert.equal path1.equals(/some\/test\/string/), true
    it 'with matching Path should return true',  -> assert.equal path1.equals(path2), true
    it 'with different Path should return false',-> assert.equal path1.equals(path3), false


  # path.isReal
  describe 'isReal', ->
    for pair in [
      ['.', true]
      ['./', true]

      path._stats = testObject
      path.refresh()
      assert.notEqual path._stats, testObject, 'stats should have been replaced'

  describe 'modified', ->

    it 'async', (done) ->

      buildPath().modified (error, mtime) ->
        assert mtime instanceof Date
        done()

    it 'sync', ->

      mtime = buildPath().modified()
      assert mtime instanceof Date

  describe 'created', ->

    it 'async', (done) ->

      buildPath().created (error, mtime) ->
        assert mtime instanceof Date
        done()

    it 'sync', ->

      mtime = buildPath().created()
      assert mtime instanceof Date

  describe 'accessed', ->

    it 'async', (done) ->

      buildPath().accessed (error, mtime) ->
        assert mtime instanceof Date
        done()

    it 'sync', ->

      mtime = buildPath().accessed()
      assert mtime instanceof Date
