 
 
     it 'should re-enable `Save` button on save error', ->
-      view = new EditorView options
+      view = new EditorView viewOptions()
       spy = spyOn model, 'save'
       spy = spy.andCallFake (attrs, opts) -> opts.error()
 

      expect(spy).toHaveBeenCalled()

    it 'should disable `Save` button on calling save', ->
      view = new EditorView options
      spy = spyOn model, 'save'

      view.render()

    expect(spy.triggerCount).toBe 2

  it 'should call `save` on clicking Save', ->
    view = new EditorView viewOptions()
    spy = spyOn view, 'save'
    view.render()
    expect(spy).not.toHaveBeenCalled()
    view.$('#editor-save-btn').trigger 'click'
    expect(spy).toHaveBeenCalled()


  describe '.save', ->

    it 'should update acornModel with shellModel attributes', ->
      view = new EditorView viewOptions()
      spy = spyOn model, 'shellData'
      view.render()
      expect(spy).not.toHaveBeenCalled()
