Use spectre-build for tests

This commit is contained in:
Kyle Fuller
2016-02-02 12:16:43 +00:00
parent 19d712b4a4
commit b4ba12bbde
22 changed files with 621 additions and 579 deletions

View File

@@ -3,13 +3,15 @@ import Stencil
import PathKit
describe("Inheritence") {
let path = Path(__FILE__) + ".." + ".." + "Tests" + "fixtures"
let loader = TemplateLoader(paths: [path])
func testInheritence() {
describe("Inheritence") {
let path = Path(__FILE__) + ".." + ".." + "fixtures"
let loader = TemplateLoader(paths: [path])
$0.it("can inherit from another template") {
let context = Context(dictionary: ["loader": loader])
let template = loader.loadTemplate("child.html")
try expect(try template?.render(context)) == "Header\nChild"
$0.it("can inherit from another template") {
let context = Context(dictionary: ["loader": loader])
let template = loader.loadTemplate("child.html")
try expect(try template?.render(context)) == "Header\nChild"
}
}
}