diff --git a/templates/view.coffee.erb b/templates/view.coffee.erb index 79527b6..ef6a07e 100644 --- a/templates/view.coffee.erb +++ b/templates/view.coffee.erb @@ -21,5 +21,5 @@ class window.<%= object_name %>View extends Backbone.View @model.save(this.attributes()) destroy: => if confirm("Are you sure?") - @model.destroy + @model.destroy() diff --git a/templates/view_spec.coffee.erb b/templates/view_spec.coffee.erb index 67b8415..ea47d02 100644 --- a/templates/view_spec.coffee.erb +++ b/templates/view_spec.coffee.erb @@ -17,10 +17,9 @@ describe '<%= object_name %>View', -> setFixtures('
') view = new <%= object_name %>View({model: model}) - - it 'should render with an update button', -> view.render() + it 'should render with an update button', -> expect(view.$('button.save')).toHaveText('Update') it 'should destroy the model', ->