         projectFindView.findEditor.setText('items')
         atom.commands.dispatch(projectFindView[0], 'project-find:confirm')
 
-        waitsForPromise ->
-          searchPromise
-
-        runs ->
+
+        waitsForPromise ->
+          searchPromise
+
+        runs ->
+          disposable = projectFindView.replaceTooltipSubscriptions
+          spyOn(disposable, 'dispose')
+
           expect(projectFindView.replaceAllButton).not.toHaveClass 'disabled'
 
           projectFindView.findEditor.setText('nopenotinthefile')


        runs ->
          expect(projectFindView.replaceAllButton).toHaveClass 'disabled'

          projectFindView.findEditor.setText('')
          atom.commands.dispatch(projectFindView[0], 'project-find:confirm')

            expect(fileContent).toBe("\\t\nb\n\\t")

    describe "replace all button enablement", ->
      disposable = null
      it "is disabled initially", ->
        expect(projectFindView.replaceAllButton).toHaveClass 'disabled'

