Hi, I'd like to stub out a partial call but not sure how.
I tried something like this
it "should render partial foo" do
template.stub_render("bar/foo")
render "/layouts/bar.html.erb"
response.should render("bar/foo")
end
but the partial is still getting called
On Jun 27,
oops, my bad
this works (asserts pass, and partial not called)
template.expect_render(:partial => 'bar/foo')
render "/layouts/bar.html.erb"
so does this:
template.stub_render(:partial => 'bar/foo')
render "/layouts/bar.html.erb"
neither case seems to try to render the parti
hi,
I'm using a helper like in nested-layouts plugin as follows
def inside_layout(layout, &block)
layout = layout.include?('/') ? layout : "layouts/#{layout}"
@template.instance_variable_set('@content_for_layout', capture
(&block))
concat(
@template.render( :file => layo
On 8/11/07, Jonathan Linowes <[EMAIL PROTECTED]> wrote:
> oops, my bad
>
> this works (asserts pass, and partial not called)
>
> template.expect_render(:partial => 'bar/foo')
> render "/layouts/bar.html.erb"
>
> so does this:
>
> template.stub_render(:partial => 'bar/foo')
> ren
Hello,
I'm trying to spec a Rails application using the couple
restful_authentication/acl_system2 plugins.
In my admin layout, I put the following code :
<% restrict_to "admin" do -%>
/users Users management
<% end -%>
Then in my spec file 'spec/views/layout/admin.rhtml_spec.rb' :
descr
On 8/11/07, barsalou <[EMAIL PROTECTED]> wrote:
>
> Sorry I left off the subject by accident...hopefully this will connect
> to the thread.
>
> Mike B.
> - Forwarded message from [EMAIL PROTECTED] -
> Date: Fri, 10 Aug 2007 14:33:18 -0800
> From: barsalou <[EMAIL PROTECTED]>
> Reply
On 8/11/07, Franck D'agostini <[EMAIL PROTECTED]> wrote:
>
> I'm trying to spec a Rails application using the couple
> restful_authentication/acl_system2 plugins.
>
> In my admin layout, I put the following code :
>
> <% restrict_to "admin" do -%>
>
>/users Users management
>
> <% end -%>
>
Sorry, I've just seen that this question has already been raised in this
mailing list.
I should have double checked first. My bad :sleep:
--
View this message in context:
http://www.nabble.com/Rspec-and-acl_system2-plugin-tf4254003.html#a12107096
Sent from the rspec-users mailing list archive