feat: Creating of templates from a string literal (#71)

This commit is contained in:
Valentin Knabel
2016-10-11 13:45:15 +02:00
committed by Kyle Fuller
parent 65c3052aee
commit 68e6ce3022
2 changed files with 23 additions and 1 deletions

View File

@@ -10,5 +10,12 @@ func testTemplate() {
let result = try template.render(context)
try expect(result) == "Hello World"
}
$0.it("can render a template from a string literal") {
let context = Context(dictionary: [ "name": "Kyle" ])
let template: Template = "Hello World"
let result = try template.render(context)
try expect(result) == "Hello World"
}
}
}