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