[rspec-users] specing a call to render :layout => "some_layout"
Daniel N
has.sox at gmail.com
Sat Jul 28 09:28:28 EDT 2007
I'm trying to specify that an action should be rendered with a given layout
one particular spec.
What I've got at the moment is this.
it "should render with the grabber layout" do
controller.should_receive( :render ).with( :layout => "my_layout" )
do_get
end
This doesnt work even though this call to render is being executed.
render :layout => "my_layout"
Firstly I don't understand why this isn't working. I'm getting an object
inspect with this message at the end
expected :render with ({:layout=>"my_layout"}) but received it with (no
> args)
>
I'd really like to understand why this isn't working, but I don't really
like it anyway. I mean, I really want to spec that under a particular set
of conditions it renders with a given layout.
I can't imagine I'm the first person to come up against this one. How are
other people handling this?
Cheers
Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070728/1a148ea7/attachment.html
More information about the rspec-users
mailing list