           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.getText().match(/\bcats\b/g)).toHaveLength 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().length).toEqual 6

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

        expect(findResultsView.children().length).toEqual 0

  describe "replacing", ->
    beforeEach ->

          findResultsView = editor.find('.search-results')

          editor.trigger 'core:close'
          expect(findResultsView.children()).toHaveLength 0

      describe "when the active pane item is not an edit session", ->
        [anotherOpener] = []
