           gutter = description.gutter
           return description if gutter.name is 'line-number'
 
-      describe ".maxLineNumberDigits", ->
+      describe ".visible", ->
+        it "is true iff the editor isn't mini, ::isLineNumberGutterVisible is true on the editor, and the 'editor.showLineNumbers' config is enabled", ->
+          presenter = buildPresenter()
+
+          expect(editor.isLineNumberGutterVisible()).toBe true
+          expect(getLineNumberGutterState(presenter).visible).toBe true
+
+          expectStateUpdate presenter, -> editor.setMini(true)
+          expect(getLineNumberGutterState(presenter)).toBeUndefined()
+
+          expectStateUpdate presenter, -> editor.setMini(false)
+          expect(getLineNumberGutterState(presenter).visible).toBe true
+
+          expectStateUpdate presenter, -> editor.setLineNumberGutterVisible(false)
+          expect(getLineNumberGutterState(presenter).visible).toBe false
+
+          expectStateUpdate presenter, -> editor.setLineNumberGutterVisible(true)
+          expect(getLineNumberGutterState(presenter).visible).toBe true
+
+          expectStateUpdate presenter, -> atom.config.set('editor.showLineNumbers', false)
+          expect(getLineNumberGutterState(presenter).visible).toBe false
+
+        it "gets updated when the editor's grammar changes", ->
+          presenter = buildPresenter()
+
+          atom.config.set('editor.showLineNumbers', false, scopeSelector: '.source.js')
+          expect(getLineNumberGutterState(presenter).visible).toBe true
+          stateUpdated = false
+          presenter.onDidUpdateState -> stateUpdated = true
+
+          waitsForPromise -> atom.packages.activatePackage('language-javascript')
+
+          runs ->
+            expect(stateUpdated).toBe true
+            expect(getLineNumberGutterState(presenter).visible).toBe false
+
+      describe ".content.maxLineNumberDigits", ->
         it "is set to the number of digits used by the greatest line number", ->
           presenter = buildPresenter()
           expect(editor.getLastBufferRow()).toBe 12

          editor.setText("1\n2\n3")
          expect(getLineNumberGutterState(presenter).content.maxLineNumberDigits).toBe 1

      describe ".lineNumbers", ->
        lineNumberStateForScreenRow = (presenter, screenRow) ->
          editor = presenter.model
          bufferRow = editor.bufferRowForScreenRow(screenRow)

            expect(getStylesForGutterWithName(presenter, 'line-number').backgroundColor).toBe "rgba(0, 0, 255, 0)"
            expect(getStylesForGutterWithName(presenter, 'test-gutter').backgroundColor).toBe "rgba(0, 0, 255, 0)"

      # TODO
      describe ".customDecorations", ->
        [presenter, gutter, decorationItem, decorationParams] = []
        [marker1, decoration1, marker2, decoration2, marker3, decoration3] = []
