it('should call fs.openSync', function() { sinon.spy(fs, 'openSync'); var tmp = new Tempfile; tmp.openSync('r'); fs.openSync.getCall(0).args[0].should.eql(tmp.path); fs.openSync.restore(); });
}).finally(function () { fs.openSync.restore(); fs.closeSync.restore(); });
after(function() { fs.openSync.restore(); fs.closeSync.restore(); });
File.prototype.openSync = function() { return fs.openSync.apply(fs, this.prepareArgs(arguments)); };