Is there a way to test views rendered in freemarker at the same time I run my unit tests? It would be great if the test failed if Freemarker threw an exception.
Rails has a feature where you can render views whenever an action is called. Is there an easy way to configure this type of behavior for Spring too?
Check out this blog post. We used this approach with great success for Velocity template. Looks like here is a working code example.
It requires few extra classes like
MockWebApplicationContextLoaderbut works great with mocked requests.