Created
May 19, 2011 21:09
-
-
Save aiwilliams/981750 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setting values on what I know are single objects in the DOM... | |
child = @child | |
@$('input[name=name]').each -> @value = child.name | |
@$('input[name=invite]').each -> @checked = child.invite | |
# Reading them in tests... | |
it 'should include the name in a text field', -> | |
input = view.$('input[name=name]')[0] | |
expect(input.value).toBe('Bobby') | |
it 'should include an invite checkbox', -> | |
input = view.$('input[type=checkbox]')[0] | |
expect(input.checked).toBe(true) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment