fix(context): Allow removing a value at a pushed state

This commit is contained in:
Kyle Fuller
2016-11-28 05:54:08 +00:00
parent 1975cfd627
commit 9af9cf4005
2 changed files with 13 additions and 2 deletions

View File

@@ -47,6 +47,15 @@ func testContext() {
try expect(context["name"] as? String) == "Kyle"
}
$0.it("allows you to remove a parent's value in a level") {
try context.push {
context["name"] = nil
try expect(context["name"]).to.beNil()
}
try expect(context["name"] as? String) == "Kyle"
}
$0.it("allows you to push a dictionary and run a closure then restoring previous state") {
var didRun = false