Rename dispose -> destroy

This commit is contained in:
Ben Ogle
2016-03-01 14:41:38 -08:00
parent 75aca7ee0c
commit 58bf090724
3 changed files with 6 additions and 5 deletions

View File

@@ -14,7 +14,7 @@ describe('AutoUpdateManager (renderer)', () => {
})
afterEach(() => {
autoUpdateManager.dispose()
autoUpdateManager.destroy()
})
describe('::onDidBeginCheckingForUpdate', () => {
@@ -88,8 +88,8 @@ describe('AutoUpdateManager (renderer)', () => {
})
})
describe('::dispose', () => {
it('subscribes to "update-not-available" event', () => {
describe('::destroy', () => {
it('unsubscribes from all events', () => {
const spy = jasmine.createSpy('spy')
const doneIndicator = jasmine.createSpy('spy')
atom.applicationDelegate.onUpdateNotAvailable(doneIndicator)
@@ -97,7 +97,7 @@ describe('AutoUpdateManager (renderer)', () => {
autoUpdateManager.onDidBeginDownloadingUpdate(spy)
autoUpdateManager.onDidCompleteDownloadingUpdate(spy)
autoUpdateManager.onUpdateNotAvailable(spy)
autoUpdateManager.dispose()
autoUpdateManager.destroy()
electronAutoUpdater.emit('checking-for-update')
electronAutoUpdater.emit('update-available')
electronAutoUpdater.emit('update-downloaded', null, null, '1.2.3')

View File

@@ -338,6 +338,7 @@ class AtomEnvironment extends Model
@commands.clear()
@stylesElement.remove()
@config.unobserveUserConfig()
@autoUpdater.destroy()
@uninstallWindowEventHandler()

View File

@@ -24,7 +24,7 @@ export default class AutoUpdateManager {
)
}
dispose () {
destroy () {
this.subscriptions.dispose()
this.emitter.dispose()
}