   describe "when updated with state that contains a new custom gutter", ->
     it "adds a CustomGutterComponent to its children", ->
       customGutter = new Gutter(mockGutterContainer, {name: 'custom'})
-      testState = buildTestState([{gutter: customGutter, visible: true}])
+      testState = buildTestState([customGutter])
 
       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)

    it "positions (and repositions) the gutters to match the order they appear in each state update", ->
      lineNumberGutter = new Gutter(mockGutterContainer, {name: 'line-number'})
      customGutter1 = new Gutter(mockGutterContainer, {name: 'custom', priority: -100})
      testState = buildTestState([customGutter1, lineNumberGutter])

      gutterContainerComponent.updateSync(testState)
      expect(gutterContainerComponent.getDomNode().children.length).toBe 2
