Disable NSObject based tests on Linux
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user