                     @$title "holla"
                 @$body ->
                     @$p "hello world"
-        xml.ready æ.done
+#         xml.ready æ.done
         xml.stream.on 'data', (tag) -> æ.equal results.shift(), tag
+        xml.stream.on 'end', ->
+            æ.equal 0, results.length
+            æ.done()
         results = [
             '<!DOCTYPE html>\n'
             '<html>\n'

            title:'test'
            content:'..'

        xml.ready æ.done
        xml.stream.on 'data', (tag) -> æ.equal results.shift(), tag
        results = [
            '<html>'
            '<head>'

            '</html>'
        ]


    pretty: (æ) ->
        xml = streamify new Template schema:5, pretty:" ", doctype:on, ->
            @$html ->
