Commit 7e0270b0 by Chris Jerdonek

Merge 'issue_70' into development: can now render views via Renderer.render().

parents aa8ad43d 7b7138b7
......@@ -10,6 +10,7 @@ import os
import sys
import unittest
from examples.simple import Simple
from pystache import renderer
from pystache.renderer import Renderer
from pystache.locator import Locator
......@@ -394,6 +395,18 @@ class RendererTestCase(unittest.TestCase):
actual = renderer.render(say_hello, to='Mars')
self.assertEquals('Hello, Mars', actual)
def test_render__view(self):
"""
Test rendering a View instance.
"""
renderer = Renderer()
view = Simple()
actual = renderer.render(view)
self.assertEquals('Hi pizza!', actual)
# By testing that Renderer.render() constructs the right RenderEngine,
# we no longer need to exercise all rendering code paths through
# the Renderer. It suffices to test rendering paths through the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment