public function testShouldCallClosureWhenAnInstanceVariableIsPassed()
{
$blockCalled = false;
$this->authority->allow('preview', 'all', function ($self, $object) use(&$blockCalled) {
$this->assertInstanceOf('stdClass', $object);
return $blockCalled = true;
});
$this->assertTrue($this->authority->can('preview', new stdClass()));
$this->assertTrue($blockCalled);
}