[rspec-users] :render expects possible?

2007-08-01 Thread Edward Ocampo-Gooding
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

Re: [rspec-users] :render expects possible?

2007-08-01 Thread David Chelimsky
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

[rspec-users] Test Rendering nothing in Rails

2007-08-01 Thread Shane Mingins
Hi In a controller I have method that is accessed via an AJAX call and will conditionally do: render :nothing = true to test the condition hitting this line I was hoping to do something like: response.should render_template(:nothing) How should I test this behaviour? Cheers Shane

Re: [rspec-users] Test Rendering nothing in Rails

2007-08-01 Thread Shane Mingins
ok ... went with response.body.should == On 2/08/2007, at 10:47 AM, Shane Mingins wrote: Hi In a controller I have method that is accessed via an AJAX call and will conditionally do: render :nothing = true to test the condition hitting this line I was hoping to do something

Re: [rspec-users] Test Rendering nothing in Rails

2007-08-01 Thread Shane Mingins
and better: response.body.should be_blank On 2/08/2007, at 10:54 AM, Shane Mingins wrote: ok ... went with response.body.should == On 2/08/2007, at 10:47 AM, Shane Mingins wrote: Hi In a controller I have method that is accessed via an AJAX call and will conditionally do:

Re: [rspec-users] :render expects possible?

2007-08-01 Thread David Chelimsky
On 8/2/07, Edward Ocampo-Gooding [EMAIL PROTECTED] wrote: David Chelimsky wrote: 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