 
         runs ->
           expect(projectFindView.replaceAllButton).toHaveClass 'disabled'
+          expect(disposable.dispose).toHaveBeenCalled()
 
           projectFindView.findEditor.setText('')
           atom.commands.dispatch(projectFindView[0], 'project-find:confirm')

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

        waitsForPromise ->
          searchPromise

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

          projectFindView.findEditor.setText('nopenotinthefile')

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

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

