 
   describe "deleteDirectory", ->
     beforeEach ->
-      @Fs.rmdir.callsArgWith(1,@error)
+      @Rimraf.callsArgWith(1,@error)
 
-    it "Should call rmdir with correct options", (done) ->
+    it "Should call rmdir(rimraf) with correct options", (done) ->
       @FSPersistorManager.deleteDirectory @location, @name1, (err) =>
-        @Fs.rmdir.calledWith("#{@location}/#{@name1}").should.equal.true
+        @Rimraf.calledWith("#{@location}/#{@name1}").should.equal.true
         done()
 
     it "Should propogate the error", (done) ->

      unlink:sinon.stub()
      rmdir:sinon.stub()
      exists:sinon.stub()
    @LocalFileWriter =
      writeStream: sinon.stub()
    @requires =

modulePath = "../../../app/js/FSPersistorManager.js"
SandboxedModule = require('sandboxed-module')
fs = require("fs")
response = require("response")

describe "FSPersistorManagerTests", ->

