Skip to content

Commit

Permalink
Fix plugin template for v4
Browse files Browse the repository at this point in the history
  • Loading branch information
abe33 committed Jan 27, 2015
1 parent e37c8d2 commit ce09615
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions templates/plugin/lib/__package-name__.coffee.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@

module.exports =
active: false
views: {}

isActive: -> @active

activate: (state) ->
atom.packages.activatePackage('minimap').then (minimapPackage) =>
@minimap = minimapPackage.mainModule
return @deactivate() unless @minimap.versionMatch('>= 3.5.0')
return @deactivate() unless @minimap.versionMatch('>= 4.0.0')

@subscriptions = new CompositeDisposable
@minimap.registerPlugin '__package-name__', this
Expand Down
5 changes: 3 additions & 2 deletions templates/plugin/spec/__package-name__-spec.coffee.template
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ __PackageName__ = require '../lib/__package-name__'
# or `fdescribe`). Remove the `f` to unfocus the block.

describe "__PackageName__", ->
[workspaceElement] = []
[workspaceElement, editor] = []

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

waitsForPromise -> atom.workspaceView.open('sample.js')
waitsForPromise ->
atom.workspace.open('sample.js')

runs ->
editor = atom.workspace.getActiveTextEditor()
Expand Down

0 comments on commit ce09615

Please sign in to comment.