Re: [rspec-users] Best Practice for Controllers

2011-01-22 Thread Phillip Koebbe
On 2011-01-21 10:25 PM, David Kahn wrote: On Mon, Jan 17, 2011 at 1:43 PM, David Chelimsky > wrote: On Jan 17, 2011, at 10:16 AM, David Kahn wrote: On Mon, Jan 17, 2011 at 9:48 AM, Ants Pants mailto:antsmailingl...@gmail.com>> wrote: Hello

Re: [rspec-users] Best Practice for Controllers

2011-01-22 Thread Ants Pants
Yes, I like that response and I do do that to a limited fashion. Maybe I should think about using it more widely. -ants On 18 January 2011 13:28, Phillip Koebbe wrote: > > > > On 17 January 2011 20:43, David Chelimsky wrote: > > > > > On Jan 17, 2011, at 10:16 AM, David Kahn wrote: > > > > > O

Re: [rspec-users] Best Practice for Controllers

2011-01-21 Thread David Kahn
On Mon, Jan 17, 2011 at 1:43 PM, David Chelimsky wrote: > On Jan 17, 2011, at 10:16 AM, David Kahn wrote: > > On Mon, Jan 17, 2011 at 9:48 AM, Ants Pants wrote: > >> Hello all, >> >> From what I've seen, this type of question doesn't really seem to get an >> answer on this list as most of the repl

Re: [rspec-users] Best Practice for Controllers

2011-01-21 Thread Andrew Premdas
On 18 January 2011 12:28, Phillip Koebbe wrote: > > > > On 17 January 2011 20:43, David Chelimsky wrote: > > > > > On Jan 17, 2011, at 10:16 AM, David Kahn wrote: > > > > > On Mon, Jan 17, 2011 at 9:48 AM, Ants Pants >wrote: > > > > >> Hello all, > > > > >> From what I've seen, this type of que

Re: [rspec-users] Best Practice for Controllers

2011-01-18 Thread Phillip Koebbe
> On 17 January 2011 20:43, David Chelimsky wrote: > > > On Jan 17, 2011, at 10:16 AM, David Kahn wrote: > > > On Mon, Jan 17, 2011 at 9:48 AM, Ants Pants > > wrote: > > >> Hello all, > > >> From what I've seen, this type of question doesn't really seem to get an > >> answer on this list as mos

Re: [rspec-users] Best Practice for Controllers

2011-01-18 Thread Ants Pants
When I read the David Kahn's response, I thought it strange to have controller code in the model and was going to query him on it so I'm glad that others think the same. As for Nick's response, I will look into it_behaves_like (I remember seeing that in the book with a pizza example) It sounds goo

Re: [rspec-users] Best Practice for Controllers

2011-01-17 Thread David Chelimsky
On Jan 17, 2011, at 10:16 AM, David Kahn wrote: > On Mon, Jan 17, 2011 at 9:48 AM, Ants Pants wrote: > Hello all, > > From what I've seen, this type of question doesn't really seem to get an > answer on this list as most of the replies relate to failures of RSpec. If > this is the case, where

Re: [rspec-users] Best Practice for Controllers

2011-01-17 Thread Nick
That behaviour exists in ApplicationController. Since ProductGroupsController inherits that behaviour from ApplicationController, the specs for ProductGroupsController should cover that behaviour. To keep your code DRY, create a shared example group that can be used in multiple controller specs

Re: [rspec-users] Best Practice for Controllers

2011-01-17 Thread David Kahn
On Mon, Jan 17, 2011 at 9:48 AM, Ants Pants wrote: > Hello all, > > From what I've seen, this type of question doesn't really seem to get an > answer on this list as most of the replies relate to failures of RSpec. If > this is the case, where is the best place to go to get advice about best > pra