 
     beforeEach ->
       unicodeText = 'ё'
-      unicodeBytes = new Buffer('\x51\x04') # 'ё'
+      unicodeBytes = Buffer.from('\x51\x04') # 'ё'
 
     it 'should read a file in UTF-16', ->
       fs.writeFileSync(file.getPath(), unicodeBytes)


    it 'honors the specified encoding', ->
      unicodeText = 'ё'
      unicodeBytes = new Buffer('\x51\x04') # 'ё'

      fs.writeFileSync(file.getPath(), unicodeBytes)


  describe 'createWriteStream()', ->
    it 'returns a stream to read the file', ->
      unicodeText = 'ё'
      unicodeBytes = Buffer.from('\x51\x04') # 'ё'

      file.setEncoding('utf16le')
      stream = file.createWriteStream()
