Update specs to match latest changes

This commit is contained in:
Matt Colyer
2013-09-19 14:55:17 -07:00
parent f82449c814
commit e8125defb9
2 changed files with 7 additions and 4 deletions

View File

@@ -175,8 +175,10 @@ describe "the `atom` global", ->
expect(keymap.bindingsForElement(element3)['ctrl-y']).toBeUndefined()
describe "menu loading", ->
beforeEach -> atom.contextMenu.definitions = []
describe "when the metadata does not contain a 'menus' manifest", ->
it "loads all the .cson/.json files in the keymaps directory", ->
it "loads all the .cson/.json files in the menus directory", ->
element = ($$ -> @div class: 'test-1')[0]
expect(atom.contextMenu.definitionsForElement(element)).toEqual []
@@ -187,7 +189,7 @@ describe "the `atom` global", ->
expect(atom.contextMenu.definitionsForElement(element)[1].label).toBe "Menu item 2"
expect(atom.contextMenu.definitionsForElement(element)[2].label).toBe "Menu item 3"
describe "when the metadata contains a 'keymaps' manifest", ->
describe "when the metadata contains a 'menus' manifest", ->
it "loads only the menus specified by the manifest, in the specified order", ->
element = ($$ -> @div class: 'test-1')[0]

View File

@@ -67,8 +67,9 @@ describe "ContextMenuManager", ->
expect(menu[0].label).toEqual 'parent'
expect(menu[0].command).toEqual 'command-p'
expect(menu[1].label).toEqual 'dev-label'
expect(menu[1].command).toEqual 'dev-command'
expect(menu[1].type).toEqual 'separator'
expect(menu[2].label).toEqual 'dev-label'
expect(menu[2].command).toEqual 'dev-command'
describe "on multiple elements", ->