         expect(buffer.getText()).toBe "hello\nworld\r\nhow are you doing?"
 
       it "combines nested transactions", ->
+        buffer.beginTransaction()
         buffer.setTextInRange([[0, 2], [0, 5]], "y")
         buffer.beginTransaction()
         buffer.setTextInRange([[2, 13], [2, 14]], "igg")

    describe "::beginTransaction()", ->
      beforeEach ->
        buffer.setTextInRange([[1, 3], [1, 5]], 'ms')
        buffer.beginTransaction()

      describe "when followed by ::commitTransaction()", ->
        it "groups all operations since the beginning of the transaction into a single undo operation", ->
          buffer.setTextInRange([[0, 2], [0, 5]], "y")
          buffer.setTextInRange([[2, 13], [2, 14]], "igg")
          buffer.commitTransaction()


      describe "when followed by ::abortTransaction()", ->
        it "undoes all operations since the beginning of the transaction", ->
          buffer.beginTransaction()
          buffer.setTextInRange([[0, 2], [0, 5]], "y")
          buffer.setTextInRange([[2, 13], [2, 14]], "igg")
          buffer.abortTransaction()
