I have the following statement mock_requester.should_receive(:request_with).with ("x").any_number_of_times.and_return(@object) which works fine, but when i do it backwards, which makes the same amount of sense syntactically, it fails mock_requester.should_receive(:request_with).with("x").and_return (@object).any_number_of_times are all of the mock options deterministic? Can they be interchangeable? Paul W Pagel www.8thLight.com blog.8thLight.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20061110/77a8e3be/attachment.html
On 11/11/06, Paul W Pagel <ppagel at 8thlight.com> wrote:> I have the following statement > > mock_requester.should_receive(:request_with).with("x").any_number_of_times.and_return(@object) > > which works fine, but when i do it backwards, which makes the same amount of > sense syntactically, it fails >How does it fail? Can you submit a failing spec as described here? http://rspec.rubyforge.org/contribute.html> mock_requester.should_receive(:request_with).with("x").and_return(@object).any_number_of_times > > are all of the mock options deterministic? Can they be interchangeable? >I thought so. We''ll see when we get your failing spec> > > Paul W Pagel > www.8thLight.com > blog.8thLight.com > > > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > >
On 11/10/06, Paul W Pagel <ppagel at 8thlight.com> wrote:> I have the following statement > > mock_requester.should_receive(:request_with).with("x").any_number_of_times.and_return(@object) > > which works fine, but when i do it backwards, which makes the same amount of > sense syntactically, it fails > > mock_requester.should_receive(:request_with).with("x").and_return(@object).any_number_of_times > > are all of the mock options deterministic?Huh?> Can they be interchangeable?Should be doable. Raise an RFE please.> > > > Paul W Pagel > www.8thLight.com > blog.8thLight.com > > > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > >