   describe "when updated with state that contains a new line-number gutter", ->
     it "adds a LineNumberGutterComponent to its children", ->
       lineNumberGutter = new Gutter(mockGutterContainer, {name: 'line-number'})
-      testState = buildTestState([{gutter: lineNumberGutter, visible: true}])
+      testState = buildTestState([lineNumberGutter])
 
       expect(gutterContainerComponent.getDomNode().children.length).toBe 0
       gutterContainerComponent.updateSync(testState)

      expect(expectedLineNumbersNode).toBe atom.views.getView(lineNumberGutter)

      # Hide one gutter, reposition one gutter, remove one gutter; and add a new gutter.
      customGutter3 = new Gutter(mockGutterContainer, {name: 'custom3', priority: 100})
      testState = buildTestState([
        {gutter: customGutter2, visible: false},
        {gutter: customGutter1, visible: true},
        {gutter: customGutter3, visible: true}
      ])
      gutterContainerComponent.updateSync(testState)
      expect(gutterContainerComponent.getDomNode().children.length).toBe 3
      expectedCustomGutterNode2 = gutterContainerComponent.getDomNode().children.item(0)


  describe "when updated with state that contains a new gutter that is not visible", ->
    it "creates the gutter view but hides it, and unhides it when it is later updated to be visible", ->
      customGutter = new Gutter(mockGutterContainer, {name: 'custom', visible: false})
      testState = buildTestState([customGutter])

      gutterContainerComponent.updateSync(testState)
      expect(gutterContainerComponent.getDomNode().children.length).toBe 1
      expectedCustomGutterNode = gutterContainerComponent.getDomNode().children.item(0)
      expect(expectedCustomGutterNode.style.display).toBe 'none'

      customGutter.show()
      testState = buildTestState([customGutter])
      gutterContainerComponent.updateSync(testState)
      expect(gutterContainerComponent.getDomNode().children.length).toBe 1
      expectedCustomGutterNode = gutterContainerComponent.getDomNode().children.item(0)
