On 25/02/14 8:47 PM, siva wrote:
Hi Guys
I have query as `Enquiry.all.group_by(&:assigned_to)`. How can I
stub and set expectation on `group_by` method?
specific answer: use stub_chain
meta-answer: don't do that, refactor your code. 2 reasons: you're
mocking an object you don't control, and you're violating law of demeter.
Thanks in advance.
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rspec/f663e473-7adc-49e5-ae9f-aa00894d3fe8%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rspec/530D86DB.4030408%40xaviershay.com.
For more options, visit https://groups.google.com/groups/opt_out.