       expect(buffer.isEmpty()).toBeFalsy()
 
   describe "::onDidChangeText(callback)",  ->
-    beforeEach (done) ->
+    beforeEach ->
       filePath = require.resolve('./fixtures/sample.js')
-      buffer = new TextBuffer({filePath, load: false})
-      buffer.load().then ->
-        done()
+      buffer = TextBuffer.loadSync(filePath)
 
     it "notifies observers after a transaction, an undo or a redo", ->
       textChanges = []


  describe "::scan(regex, fn)", ->
    beforeEach ->
      buffer = new TextBuffer(filePath: require.resolve('./fixtures/sample.js'))
      buffer.loadSync()

    it "calls the given function with the information about each match", ->
      matches = []

  describe "::scanInRange(range, regex, fn)", ->
    beforeEach ->
      filePath = require.resolve('./fixtures/sample.js')
      buffer = TextBuffer.loadSync(filePath)

    describe "when given a regex with a ignore case flag", ->
      it "does a case-insensitive search", ->
