diff --git a/spec/Suite/BoxSpec.php b/spec/Suite/BoxSpec.php index 15365c0..bbd8196 100644 --- a/spec/Suite/BoxSpec.php +++ b/spec/Suite/BoxSpec.php @@ -279,7 +279,7 @@ public function __construct() box(false); }); - it("adds aa box", function() { + it("adds a box", function() { $box = new Box(); $actual = box('box.spec', $box); @@ -296,6 +296,23 @@ public function __construct() expect($actual)->toBe($box); }); + it("adds a default box", function() { + + $box = new Box(); + + expect(box($box))->toBe($box); + expect(box())->toBe($box); + + }); + + it("gets a default box", function() { + + $box = box(); + expect($box)->toBeAn('object'); + expect(box())->toBe($box); + + }); + it("removes a box", function() { $box = new Box(); @@ -333,4 +350,4 @@ public function __construct() expect($closure)->toThrow("Unexisting box `'box.spec'`."); }); -}); \ No newline at end of file +}); diff --git a/src/init.php b/src/init.php index 17d1c16..182d9d6 100644 --- a/src/init.php +++ b/src/init.php @@ -1,5 +1,6 @@