         editor.setCursorBufferPosition([4,0])
         editor.insertText("items items")
 
-        expect(findResultsView.children().length).toEqual 8
+        expect(findResultsView.children()).toHaveLength 8
         expect(findView.resultCounter.text()).toEqual('8 found')
         expect(editor.getSelectedBufferRange()).toEqual [[4, 11], [4, 11]]
 

          editor.trigger 'find-and-replace:replace-all'
          expect(findView.resultCounter.text()).toEqual('no results')
          expect(editor.getText()).not.toMatch /items/
          expect(editor.getText().match(/\bcats\b/g).length).toMatch 6
          expect(editor.getSelectedBufferRange()).toEqual [[2, 0], [2, 0]]

    describe "replacement patterns", ->


      it "only highlights matches", ->
        expect(findResultsView.parent()[0]).toBe editor.underlayer[0]
        expect(findResultsView.children()).toHaveLength 6

        findView.findEditor.setText 'notinthefilebro'
        findView.focus()
        $(document.activeElement).trigger 'core:confirm'

        expect(findResultsView.children()).toHaveLength 0

  describe "replacing", ->
    beforeEach ->
