16 lines
420 B
Swift
16 lines
420 B
Swift
import Spectre
|
|
import Stencil
|
|
import PathKit
|
|
|
|
|
|
describe("Inheritence") {
|
|
let path = Path(__FILE__) + ".." + ".." + "StencilSpecs" + "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"
|
|
}
|
|
}
|