I have some Ruby code which looks like this:
Something.create do |x|
x.foo = bar
end
I'd like to write a test which uses a double in place of the block argument x, so that I can then call:
x_double.should_receive(:foo).with("whatever").
Is this possible?