mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
Always mock atom.packages.resolvePackagePath
…instead of only in package specs. This allows specs that assume it is mocked to work correctly when we run the full spec suite. Namely, the settings-view specs had an issue with this.
This commit is contained in:
@@ -59,13 +59,12 @@ beforeEach ->
|
||||
atom.syntax.clearGrammarOverrides()
|
||||
atom.syntax.clearProperties()
|
||||
|
||||
if specPackageName
|
||||
spy = spyOn(atom.packages, 'resolvePackagePath').andCallFake (packageName) ->
|
||||
if packageName is specPackageName
|
||||
resolvePackagePath(specPackagePath)
|
||||
else
|
||||
resolvePackagePath(packageName)
|
||||
resolvePackagePath = _.bind(spy.originalValue, atom.packages)
|
||||
spy = spyOn(atom.packages, 'resolvePackagePath').andCallFake (packageName) ->
|
||||
if specPackageName and packageName is specPackageName
|
||||
resolvePackagePath(specPackagePath)
|
||||
else
|
||||
resolvePackagePath(packageName)
|
||||
resolvePackagePath = _.bind(spy.originalValue, atom.packages)
|
||||
|
||||
# used to reset keymap after each spec
|
||||
bindingSetsToRestore = _.clone(keymap.bindingSets)
|
||||
|
||||
Reference in New Issue
Block a user