         atom.workspaceView.trigger 'minimap:toggle-dummy'
 
       it 'should have received a deactivation call', ->
-        expect(@plugin.deactivatePlugin).toHaveBeenCalled()
+        expect(plugin.deactivatePlugin).toHaveBeenCalled()
 
     describe 'and then unregistered', ->
       beforeEach ->

      atom.config.set 'minimap.displayPluginsControls', true
      atom.config.set 'minimap.plugins.dummy', undefined

    @plugin =
      active: false
      activatePlugin: -> @active = true
      deactivatePlugin: -> @active = false
      isActive: -> @active

    spyOn(@plugin, 'activatePlugin').andCallThrough()
    spyOn(@plugin, 'deactivatePlugin').andCallThrough()

    @registerHandler = jasmine.createSpy('register handler')
    @unregisterHandler = jasmine.createSpy('unregister handler')

{WorkspaceView} = require 'atom'

describe "Minimap Plugins", ->
  [plugin] = []
  beforeEach ->
    runs ->
      atom.workspaceView = new WorkspaceView
