       wrapGuide.updateGuide()
       width = editor.getDefaultCharWidth() * 20
       expect(width).toBeGreaterThan(0)
-      expect($(wrapGuide).position().left).toBe(width)
+      expect(getLeftPosition(wrapGuide)).toBe(width)
 
     it "uses the default column when no custom column matches the path", ->
       atom.config.set('wrap-guide.columns', [{pattern: '\.jsp$', column: '100'}])
       wrapGuide.updateGuide()
       width = editor.getDefaultCharWidth() * wrapGuide.getDefaultColumn()
       expect(width).toBeGreaterThan(0)
-      expect($(wrapGuide).position().left).toBe(width)
+      expect(getLeftPosition(wrapGuide)).toBe(width)
 
     it "hides the guide when the config column is less than 1", ->
       atom.config.set('wrap-guide.columns', [{pattern: 'sample\.js$', column: -1}])

      wrapGuide.updateGuide()
      width = editor.getDefaultCharWidth() * 20
      expect(width).toBeGreaterThan(0)
      expect($(wrapGuide).position().left).toBe(width)

describe "WrapGuide", ->
  [editor, wrapGuide, workspaceElement] = []

  getLeftPosition = (el) ->
    parseInt(el.style.left)

  beforeEach ->
    workspaceElement = atom.views.getView(atom.workspace)
