From 07a4e059024dc7f532707c669b8a8923d3c170fc Mon Sep 17 00:00:00 2001 From: Jeremy Tregunna Date: Sun, 30 Oct 2011 22:32:47 -0600 Subject: [PATCH] adds block scope spec --- core/block/scope-spec.io | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 core/block/scope-spec.io diff --git a/core/block/scope-spec.io b/core/block/scope-spec.io new file mode 100644 index 0000000..2329e67 --- /dev/null +++ b/core/block/scope-spec.io @@ -0,0 +1,15 @@ +describe("Block Scope", + setup( + blk := block(1) setScope(Object) + ) + + it("allows scope to be modified", + a := blk clone setScope(nil) + a scope verify(!= Object) + ) + + it("self points at the scope", + blk := block(self) setScope(1) + blk call verify(== 1) + ) +)