Disable NSObject based tests on Linux

This commit is contained in:
Kyle Fuller
2016-02-11 19:25:26 -05:00
parent b4ba12bbde
commit 6deb93ac19
3 changed files with 14 additions and 5 deletions

View File

@@ -3,9 +3,11 @@ import Spectre
import Stencil
#if os(OSX)
@objc class Object : NSObject {
let title = "Hello World"
}
#endif
func testVariable() {
@@ -16,9 +18,12 @@ func testVariable() {
"profiles": [
"github": "kylef",
],
"object": Object(),
])
#if os(OSX)
context.push(["object": Object()])
#endif
$0.it("can resolve a string literal with double quotes") {
let variable = Variable("\"name\"")
let result = try variable.resolve(context) as? String
@@ -61,10 +66,12 @@ func testVariable() {
try expect(result) == "Carlton"
}
#if os(OSX)
$0.it("can resolve a value via KVO") {
let variable = Variable("object.title")
let result = try variable.resolve(context) as? String
try expect(result) == "Hello World"
}
#endif
}
}