fix(spec): fix config setting spy

This commit is contained in:
Evan Morikawa 2016-05-19 11:50:06 -07:00
parent c6f6c7c3a0
commit b0e66519fc

View file

@ -199,12 +199,12 @@ beforeEach ->
fakePersistedConfig = {}
spyOn(Config::, 'getRawValues').andCallFake =>
fakePersistedConfig
spyOn(Config::, 'setRawValue').andCallFake (keyPath, value) =>
spyOn(Config::, 'setRawValue').andCallFake (keyPath, value) ->
if (keyPath)
_.setValueForKeyPath(fakePersistedConfig, keyPath, value)
else
fakePersistedConfig = value
return fakePersistedConfig
this.load()
NylasEnv.config = new Config()
NylasEnv.loadConfig()