Tags can take a function for their content.

This commit is contained in:
Nathan Sobo
2011-12-27 15:57:29 -06:00
parent 22167faf28
commit e570c5d454
2 changed files with 15 additions and 1 deletions

View File

@@ -14,3 +14,9 @@ fdescribe "Builder", ->
builder.tag 'ol'
expect(builder.toHtml()).toBe("<ol></ol>")
it "can generate tags with content", ->
builder.tag 'ol', ->
builder.tag 'li'
builder.tag 'li'
expect(builder.toHtml()).toBe("<ol><li></li><li></li></ol>")