[rspec-users] expect_render(...).and_return('x')

Rob Holland rob.holland at gmail.com
Fri Jan 25 08:19:31 EST 2008


Thanks for looking at the problem.

> The trick here is that render :partial is NOT getting called on the
> controller - it's getting called on the template that is yielded to
> render :update.

I think I follow, still getting my head around that.

> Here's the way I would handle this: http://pastie.caboo.se/143246

I gave that a go, but the render :update line then triggers:

Mock 'expect_render_mock_proxy' asked to yield
|[#<Spec::Mocks::Mock:0x126ad08 @name="template">]| but no block was

More information about the rspec-users mailing list