       expectPreviewInSplitPane()
 
       runs ->
-        [editorPane] = getCenter().getPanes()
+        [editorPane] = atom.workspace.getCenter().getPanes()
         expect(editorPane.getItems()).toHaveLength 1
         expect(editorPane.isActive()).toBe true
 

          listener.callCount > 0

      it "allows a new split pane of the preview to be created", ->
        getCenter().getPanes()[1].splitRight({copyActiveItem: true})

        expect(getCenter().getPanes()).toHaveLength 3

        waitsFor "split markdown preview to be created", ->
          preview = getCenter().getPanes()[2].getActiveItem()

        runs ->
          expect(preview).toBeInstanceOf(MarkdownPreviewView)

      atom.packages.activatePackage('language-gfm')

  expectPreviewInSplitPane = ->
    waitsFor -> atom.workspace.getCenter().getPanes().length is 2

    waitsFor "markdown preview to be created", ->
      preview = atom.workspace.getCenter().getPanes()[1].getActiveItem()

    runs ->
      expect(preview).toBeInstanceOf(MarkdownPreviewView)
