[rspec-users] expect_render, why does there need to be a warning
zach.dennis at gmail.com
Tue Aug 14 00:58:58 EDT 2007
There is a warning on the web site about expect_render and stub_render:
"WARNING: expect_render and stub_render, while very useful, act
differently from standard Message Expectations (a.k.a. mock
expectations), which would never pass calls through to the real
object. This can be very confusing when there are failures if you're
not aware of this fact, because some calls will be passed through
while others will not. This is especially confusing when you use
stub_render because, as with all Method Stubs, you will get very
little feedback about what is going on."
Is this a sign that expect_render is doing to much?
Is there a benefit from having expect_render and stub_render sometimes
pass the render call to the underlying template object?
Why not force all partials to be tested individually?
Testing partials individually seems like a cleaner, more consistent
and less confusing route to go, especially when you consider the
nesting of paritals which render other partials.
More information about the rspec-users