diff --git a/spec/project-spec.coffee b/spec/project-spec.coffee index a1cdce662..d89802243 100644 --- a/spec/project-spec.coffee +++ b/spec/project-spec.coffee @@ -221,7 +221,7 @@ describe "Project", -> beforeEach -> absolutePath = require.resolve('./fixtures/dir/a') newBufferHandler = jasmine.createSpy('newBufferHandler') - atom.project.on 'buffer-created', newBufferHandler + atom.project.onDidAddBuffer(newBufferHandler) describe "when given an absolute path that isn't currently open", -> it "returns a new edit session for the given path and emits 'buffer-created'", -> @@ -502,8 +502,12 @@ describe "Project", -> describe ".eachBuffer(callback)", -> beforeEach -> + jasmine.snapshotDeprecations() atom.project.bufferForPathSync('a') + afterEach -> + jasmine.restoreDeprecationsSnapshot() + it "invokes the callback for existing buffer", -> count = 0 count = 0 diff --git a/spec/spec-helper.coffee b/spec/spec-helper.coffee index 5406ff33a..70fb4fb58 100644 --- a/spec/spec-helper.coffee +++ b/spec/spec-helper.coffee @@ -72,7 +72,6 @@ if specDirectory isCoreSpec = specDirectory == fs.realpathSync(__dirname) beforeEach -> - Grim.clearDeprecations() if isCoreSpec $.fx.off = true documentTitle = null projectPath = specProjectPath ? path.join(@specDirectory, 'fixtures') diff --git a/spec/text-editor-component-spec.coffee b/spec/text-editor-component-spec.coffee index a5ca4c309..b2ef2ec51 100644 --- a/spec/text-editor-component-spec.coffee +++ b/spec/text-editor-component-spec.coffee @@ -728,7 +728,7 @@ describe "TextEditorComponent", -> expect(cursorNodes[0].style['-webkit-transform']).toBe "translate(#{10 * charWidth}px, #{4 * lineHeightInPixels}px)" expect(cursorNodes[1].style['-webkit-transform']).toBe "translate(#{11 * charWidth}px, #{8 * lineHeightInPixels}px)" - wrapperView.on 'cursor:moved', cursorMovedListener = jasmine.createSpy('cursorMovedListener') + editor.onDidChangeCursorPosition cursorMovedListener = jasmine.createSpy('cursorMovedListener') cursor3.setScreenPosition([4, 11], autoscroll: false) nextAnimationFrame() expect(cursorNodes[0].style['-webkit-transform']).toBe "translate(#{11 * charWidth}px, #{4 * lineHeightInPixels}px)"