Skip to content

Instantly share code, notes, and snippets.

@asalant
Created October 11, 2012 04:38
Show Gist options
  • Select an option

  • Save asalant/3870193 to your computer and use it in GitHub Desktop.

Select an option

Save asalant/3870193 to your computer and use it in GitHub Desktop.
Ubiquitous JS example: UserEditView spec
{ Factory } = require '../../support/spec_helper'
UserEditView = require '../../../../client/js/views/user_edit_view'
describe 'UserEditView', ->
describe 'render', ->
{user, view} = {}
beforeEach ->
user = Factory.create 'user'
view = new UserEditView(user)
view.render()
it 'binds user to form', ->
expect(view.$('input[name=email]').val()).toEqual user.get('email')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment