Re: [rspec-users] template.expect_render

2007-08-11 Thread Jonathan Linowes
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,

Re: [rspec-users] template.expect_render

2007-08-11 Thread Jonathan Linowes
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

[rspec-users] nested layouts

2007-08-11 Thread Jonathan Linowes
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

Re: [rspec-users] template.expect_render

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

[rspec-users] Rspec and acl_system2 plugin

2007-08-11 Thread Franck D'agostini
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

Re: [rspec-users] Using rcov and ouput to screen

2007-08-11 Thread aslak hellesoy
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

Re: [rspec-users] Rspec and acl_system2 plugin

2007-08-11 Thread Courtenay
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 -%> >

Re: [rspec-users] Rspec and acl_system2 plugin

2007-08-11 Thread Franck D'agostini
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