Disable the now tag on Linux

NSDate is unavailable
This commit is contained in:
Kyle Fuller
2016-02-11 19:31:39 -05:00
parent 6deb93ac19
commit 3ec009381d
4 changed files with 15 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ import Stencil
func testNowNode() {
#if !os(Linux)
describe("NowNode") {
$0.describe("parsing") {
$0.it("parses default format without any now arguments") {
@@ -38,4 +39,5 @@ func testNowNode() {
}
}
}
#endif
}

View File

@@ -38,9 +38,14 @@ func testTokenParser() {
}
$0.it("can parse a tag token") {
let namespace = Namespace()
namespace.registerSimpleTag("known") { _ in
return ""
}
let parser = TokenParser(tokens: [
Token.Block(value: "now"),
], namespace: Namespace())
Token.Block(value: "known"),
], namespace: namespace)
let nodes = try parser.parse()
try expect(nodes.count) == 1