Make the font size 16 in specs, because a few specs depend on it

This commit is contained in:
Nathan Sobo
2012-12-12 16:39:23 -08:00
parent 8945a3f64b
commit 7bf0022d3f
2 changed files with 4 additions and 6 deletions

View File

@@ -547,13 +547,10 @@ describe "Editor", ->
it "updates the gutter width and font size", ->
rootView.attachToDom()
originalFontSize = editor.getFontSize()
originalGutterWidth = editor.gutter.width()
config.editor.fontSize = originalFontSize * 4
config.editor.fontSize = 16 * 4
config.update()
expect(editor.gutter.css('font-size')).toBe "#{originalFontSize * 4}px"
expect(editor.gutter.width()).toBe(originalGutterWidth * 4)
expect(editor.gutter.css('font-size')).toBe "#{16 * 4}px"
expect(editor.gutter.width()).toBe(141)
it "updates lines if there are unrendered lines", ->
editor.attachToDom(heightInLines: 5)

View File

@@ -26,6 +26,7 @@ beforeEach ->
spyOn(config, 'load')
spyOn(config, 'save')
config.assignDefaults()
config.editor.fontSize = 16
# make editor display updates synchronous
spyOn(Editor.prototype, 'requestDisplayUpdate').andCallFake -> @updateDisplay()