I have a test double that I'd like to be able to receive any message.
I know I can expect the double to receive a certain message and return a value like so:
foo = double()
allow(foo).to receive(:bar) { "Foobar" }
I can also allow foo
to receive any message using #as_null_object
like:
foo = double()
foo.as_null_object
Is there any other syntax for this? Seems I should be able to do something like:
allow(foo).to receive(:anything)