Re: [rspec-users] specifying a controller's layout

2008-10-18 Thread David Chelimsky
On Sat, Oct 18, 2008 at 2:44 AM, Nick Hoffman <[EMAIL PROTECTED]> wrote: > On 2008-10-17, at 17:16, David Chelimsky wrote: >> >> Cool. Don't forget the seldom used #head, though I don't know what to >> call it: when_heading_to? > > I looked through the docs at http://rspec.rubyforge.org/rspec/1.1.8

Re: [rspec-users] specifying a controller's layout

2008-10-17 Thread Nick Hoffman
On 2008-10-17, at 17:16, David Chelimsky wrote: Cool. Don't forget the seldom used #head, though I don't know what to call it: when_heading_to? I looked through the docs at http://rspec.rubyforge.org/rspec/1.1.8/ for #head , but the closest thing I found was #header , which is undocumented.

Re: [rspec-users] specifying a controller's layout

2008-10-17 Thread David Chelimsky
On Thu, Oct 16, 2008 at 1:18 PM, Rahoul Baruah <[EMAIL PROTECTED]> wrote: > > On 16 Oct 2008, at 16:02, Stephen Eley wrote: > >> This confused me too at first. To put it another way: >> >> (1) controller.expect_render(:layout => 'index') [set expectation] >> (2) get :index [perform action] >>

Re: [rspec-users] specifying a controller's layout

2008-10-16 Thread Rahoul Baruah
On 16 Oct 2008, at 16:02, Stephen Eley wrote: This confused me too at first. To put it another way: (1) controller.expect_render(:layout => 'index') [set expectation] (2) get :index [perform action] ...is equivalent to... (1) Call spouse to say "Honey, I'm coming home, see you shortly."

Re: [rspec-users] specifying a controller's layout

2008-10-16 Thread Stephen Eley
On Thu, Oct 16, 2008 at 9:49 AM, Jim Gay <[EMAIL PROTECTED]> wrote: > > Because you are creating an expectation for the following action. > In your code above, you are doing the action, and then creating an > expectation for a following action which never occurs, so it receives it 0 > times followi

Re: [rspec-users] specifying a controller's layout

2008-10-16 Thread Dave Phiri
Jim Gay wrote: > On Oct 16, 2008, at 7:59 AM, Dave Phiri wrote: > >> >> David: >> Why is it that >> >> get :some_action >> controller.expect_render(:layout => 'special_layout') >> >> ie having the get statement before the controller.expect.. statement >> produces the ff error: >> Mock 'expect_rend

Re: [rspec-users] specifying a controller's layout

2008-10-16 Thread Jim Gay
On Oct 16, 2008, at 7:59 AM, Dave Phiri wrote: David Chelimsky wrote: On Thu, Sep 4, 2008 at 8:42 AM, Matt Wynne <[EMAIL PROTECTED]> wrote: I want to spec that a controller uses a particular layout how do I do that? Depends on what else is going on, but this is the simplest situation: co

Re: [rspec-users] specifying a controller's layout

2008-10-16 Thread Dave Phiri
David Chelimsky wrote: > On Thu, Sep 4, 2008 at 8:42 AM, Matt Wynne <[EMAIL PROTECTED]> wrote: >> I want to spec that a controller uses a particular layout >> how do I do that? > > Depends on what else is going on, but this is the simplest situation: > > controller.expect_render(:layout => 'spe

Re: [rspec-users] specifying a controller's layout

2008-09-04 Thread Matt Wynne
On 4 Sep 2008, at 16:12, Jonathan Linowes wrote: noting my own typo def negeative_failure_message should be def negative_failure_message :) Copy & Paste Considered Harmfull ;) Thanks ___ rspec-users mailing list rspec-users@rubyforg

Re: [rspec-users] specifying a controller's layout

2008-09-04 Thread Jonathan Linowes
noting my own typo def negeative_failure_message should be def negative_failure_message :) On Sep 4, 2008, at 10:24 AM, Matt Wynne wrote: Thanks David. I really struggled to get that to catch anything. My colleague Dan found this, which is working well for me: http://rubyfo

Re: [rspec-users] specifying a controller's layout

2008-09-04 Thread Matt Wynne
Thanks David. I really struggled to get that to catch anything. My colleague Dan found this, which is working well for me: http://rubyforge.org/pipermail/rspec-users/2007-May/001816.html On 4 Sep 2008, at 15:05, David Chelimsky wrote: On Thu, Sep 4, 2008 at 8:42 AM, Matt Wynne <[EMAIL PROTE

Re: [rspec-users] specifying a controller's layout

2008-09-04 Thread David Chelimsky
On Thu, Sep 4, 2008 at 8:42 AM, Matt Wynne <[EMAIL PROTECTED]> wrote: > I want to spec that a controller uses a particular layout > how do I do that? Depends on what else is going on, but this is the simplest situation: controller.expect_render(:layout => 'special_layout') get :some_action __

[rspec-users] specifying a controller's layout

2008-09-04 Thread Matt Wynne
I want to spec that a controller uses a particular layout how do I do that? cheers, Matt http://blog.mattwynne.net http://songkick.com In case you wondered: The opinions expressed in this email are my own and do not necessarily reflect the views of any former, current or future employe