On 28 Aug 2009, at 19:44, Marcelo de Moraes Serpa wrote:
Hello list,
Since stubs don't set expectations, do we have any use-case where
stubbing like this makes sense:
@mock.stub!(:method).with(anything()).and_return(@collection).
It is clear that and_return is the value from stubbing, but the with
doesn't make any sense, in case, IMO.
I *think* the point here is that it would be distinct from another
stub on the same method that specified #with some specific parameters.
The one #with(anything()) would then be used as the fall-back. Maybe?
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users