         spyOn(editor, "splitLeft").andCallThrough()
         expect(rootView.find('.editor').length).toBe 1
         rootView.trigger 'fuzzy-finder:toggle-buffer-finder'
-        finder.miniEditor.trigger 'editor:split-left'
+        finderView.miniEditor.trigger 'editor:split-left'
         expect(rootView.find('.editor').length).toBe 2
         expect(editor.splitLeft).toHaveBeenCalled()
         expect(rootView.getActiveEditor()).not.toBe editor

      rootView.trigger 'fuzzy-finder:find-under-cursor'

      waitsFor ->
        finder.is(':visible')

      runs ->
        expect(finder.find('.error').text().length).toBeGreaterThan 0


  describe "opening a path into a split", ->

fs = require 'fs'

describe 'FuzzyFinder', ->
  [finderView] = []

  beforeEach ->
    rootView = new RootView(require.resolve('fixtures/sample.js'))
    rootView.enableKeymap()
    finderView = atom.loadPackage("fuzzy-finder").packageMain.createView()

  afterEach ->
    rootView.deactivate()
