On 8/1/07, Edward Ocampo-Gooding <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Is it possible to do the following in a controller spec?
>
>    @controller.should_receive(:render).with(:layout => false)
>
> I've been trying this kind of thing and it looks like RSpec is messing
> with the render calls, and requires you to use render_template instead.
>
> Could we have at least a warning that mentions that parameters passed to
> :render expectations are going to be thrown away and mention an
> alternative way of spec-ing this behaviour?

In trunk, when you call should_receive(:render) you will get an error
saying you should use the new method (also in trunk)
controller.expects_render.

Cheers,
David

> Thanks,
> Edward
> _______________________________________________
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to