--
You received this message because you are subscribed to the Google Groups "rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rspec+un...@googlegroups.com.
To post to this group, send email to rs...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/8d5d5525-5749-4284-b8d7-e38833758d13%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thanks for the suggestion! I agree with Jon, though, for a couple reasons:
expect and allow against all types of test doubles (including partial doubles). Changing the default behavior for one specific situations (using expect on a partial double) is, IMO, quite confusing. Consider, for example, this bit of code: expect(foo).to receive(:bar); foo.bar. If we made the change, what would it do? It would depend on what foo was, which might not be obvious from looking at the example in isolation (foo might be provided by a helper method defined in a module in a separate file or something).and_call_original, it would surprisingly do the thing they are trying to prevent, which could have dangerous consequences. This would especially be a problem with long time RSpec users who expect the existing behavior and aren’t aware of the change.Myron
To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/E66977996C89404F837AD40B422F324A%40jonrowe.co.uk.