           top: 0
           height: 10
           class: 'test-class-1'
-      customGutterComponent.updateSync(buildTestState(customDecorations))
-      decorationsWrapperNode = customGutterComponent.getDomNode().children.item(0)
+      gutterComponent.updateSync(buildTestState(customDecorations))
+      decorationsWrapperNode = gutterComponent.getDomNode().children.item(0)
       expect(decorationsWrapperNode.children.length).toBe 1
 
       emptyCustomDecorations = 'test-gutter': {}
-      customGutterComponent.updateSync(buildTestState(emptyCustomDecorations))
+      gutterComponent.updateSync(buildTestState(emptyCustomDecorations))
       expect(decorationsWrapperNode.children.length).toBe 0

          top: 10
          height: 20
          class: 'test-class-2'
      customGutterComponent.updateSync(buildTestState(changedCustomDecorations))
      changedDecorationNode = customGutterComponent.getDomNode().children.item(0).children.item(0)
      expect(changedDecorationNode).toBe initialDecorationNode
      expect(changedDecorationNode.style.top).toBe '10px'
      expect(changedDecorationNode.style.height).toBe '20px'

Gutter = require '../src/gutter'

describe "CustomGutterComponent", ->
  [gutterComponent, gutter] = []

  beforeEach ->
    mockGutterContainer = {}
    gutter = new Gutter(mockGutterContainer, {name: 'test-gutter'})
    gutterComponent = new CustomGutterComponent({gutter})

  it "creates a gutter DOM node with only an empty 'custom-decorations' child node when it is initialized", ->
    expect(gutterComponent.getDomNode().classList.contains('gutter')).toBe true
    expect(gutterComponent.getDomNode().getAttribute('gutter-name')).toBe 'test-gutter'
    expect(gutterComponent.getDomNode().children.length).toBe 1
    decorationsWrapperNode = gutterComponent.getDomNode().children.item(0)
    expect(decorationsWrapperNode.classList.contains('custom-decorations')).toBe true

  it "makes its view accessible from the view registry", ->
    expect(gutterComponent.getDomNode()).toBe atom.views.getView(gutter)

  it "hides its DOM node when ::hideNode is called, and shows its DOM node when ::showNode is called", ->
    gutterComponent.hideNode()
    expect(gutterComponent.getDomNode().style.display).toBe 'none'
    gutterComponent.showNode()
    expect(gutterComponent.getDomNode().style.display).toBe ''

  describe "::updateSync", ->
    decorationItem1 = document.createElement('div')
