I want to test that something
receives #var
from inside the block.
I realize this might be a code smell.
something = Struct.new(:var).new
some_method do
something.var
end
I want to test that #var
was sent to something
. In other words, something.should_receive(:var)
.
It's not clear to me what you're asking--on the surface, it sounds like
something.should_receive(:var)
would work, but it's clear there's more going on here..