Displaying 1 result from an estimated 1 matches for "someargu".
Did you mean:
someargs
2008 Jun 02
1
Cherry-picking mocks?!
...d a week or so ago,
which seems related.
Let me start with the earlier issue.
He was trying to write specs for a method which sends the same message
possibly multiple times, but with different arguments under different
calling conditions. He wanted to write
something.should_receive(:foo).with(someArguments)
except that the other calls would cause this to fail. He was trying to get
this to work by specifying ordered expectations but this was getting messy.
What he really wanted was some kind of paired mock and stub, so that the
expectation that the method would be invoked with the given argumen...