           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 "highlights the found text in the new edit session (and removes the highlights from the other)", ->
          findResultsView = editor.find('.search-results')

          expect(findResultsView.children().length).toEqual 6
          newEditor = editor.splitRight(project.open('sample.coffee'))
          expect(findResultsView.children().length).toEqual 0

    describe "when the buffer contents change", ->
      it "re-runs the search", ->

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

          rootView.open "another"
          expect(findResultsView.children()).toHaveLength 0

      describe "when a new edit session is activated on a different pane", ->
        it "updates the result view and selects the correct text", ->
