Builder correctly generates void (self-closing) tags.

This commit is contained in:
Nathan Sobo
2011-12-27 16:43:28 -06:00
parent 21fb88141e
commit bd79d9cd5d
2 changed files with 29 additions and 10 deletions

View File

@@ -35,3 +35,7 @@ fdescribe "Builder", ->
expect(fragment.attr('id')).toBe('foo')
expect(fragment.attr('class')).toBe('bar')
it "can generate self-closing tags", ->
builder.tag 'br', id: 'foo'
expect(builder.toHtml()).toBe('<br id="foo">')