       jasmine.attachToDOM(workspaceElement)
       editor = atom.workspace.getActiveTextEditor()
       editorElement = atom.views.getView(editor)
-      promise = atom.packages.activatePackage("find-and-replace")
+      promise = atom.packages.activatePackage("find-and-replace").then ({mainModule}) ->
+        findOptions = mainModule.findOptions
       atom.commands.dispatch editorElement, 'find-and-replace:show'
 
     waitsForPromise ->

path = require 'path'
SelectNext = require '../lib/select-next'

describe "SelectNext", ->
  [workspaceElement, editorElement, editor, promise] = []

  beforeEach ->
    workspaceElement = atom.views.getView(atom.workspace)

        ]

  describe "find-and-replace:select-skip", ->
    beforeEach ->
      findOptions.set(wholeWord: true)

    describe "when there is no selection", ->
      it "does nothing", ->
        editor.setText """
