}
public void test (Spec spec) {
loader.setSpec(spec);
String tmpl = spec.getTemplate();
Template t = compiler.compile(spec.getTemplate());
String out = t.execute(spec.getData());
Assert.assertEquals(String.format("When rendering '''%s''' with '%s'",
tmpl.replaceAll("\n", "\\\\n"),
spec.getData().toString().replaceAll("\n", "\\\\n")),
spec.getExpectedOutput(), out);
}