This test would work whether you used `in_context` or not because `expected` is contained by the closure.

A better way to test this would be to pass an object to `self` that response to something (say, `value`), and then calling `value` from within the block, like:

``` ruby
context = stub(value: nil)
expect(controller_with_session(var: 'hi')).
  to set_session(:other).in_context(context).to { value }
```