'An Element with a valid render directive has that directive invoked and
the result added to the output.'

def test_directiveRendering(self):

    renders = []
    class RenderfulElement(Element, ):
        @renderer
        def renderMethod(self, request, tag):
            renders.append((self, request))
            return tag('Hello,    world.')
    element = RenderfulElement(loader=XMLString('\n                                <p    xmlns:t="http://twistedmatrix.com/ns/twisted.web.template/0.1"\n                                        t:render="renderMethod"    />\n                                '))
    return self.assertFlattensTo(element, '<p>Hello,    world.</p>')
