Re: [rspec-users] testing a post to a controller's create action

2011-11-19 Thread Patrick J. Collins
> > I never see the debugger prompt.. Can anyone PLEASE tell me why this is not > > working? In any other test, binding.pry or debugger interrupts the test > > flow > > and gives me access to the current scope of the debugger call. > > Got any authentication in front of posts#create? Yeah, tha

Re: [rspec-users] testing a post to a controller's create action

2011-11-19 Thread Justin Ko
On Nov 19, 2011, at 9:57 AM, Patrick J. Collins wrote: >>> I never see the debugger prompt.. Can anyone PLEASE tell me why this is not >>> working? In any other test, binding.pry or debugger interrupts the test >>> flow >>> and gives me access to the current scope of the debugger call. >> >>

Re: [rspec-users] testing a post to a controller's create action

2011-11-19 Thread Patrick J. Collins
> #store_params is not an "action", therefore I would make it private. I agree completely, and probably should have specified that in my sample code (it certainly is private in my real non-hypothetical implementation). > Since it is used only by the #create action, I would spec it as part of the

Re: [rspec-users] testing a post to a controller's create action

2011-11-19 Thread Justin Ko
On Nov 19, 2011, at 4:03 PM, Patrick J. Collins wrote: >> #store_params is not an "action", therefore I would make it private. > > I agree completely, and probably should have specified that in my sample code > (it certainly is private in my real non-hypothetical implementation). > >> Since it

Re: [rspec-users] testing a post to a controller's create action

2011-11-19 Thread Patrick J. Collins
> Please post the backtrace. Failures: 1) PostsController#store_post_params stores the last post params in the session Failure/Error: post :create, { :submit_action => submit_type.to_s, :post => { :foo => "bar" } } ActiveRecord::UnknownAttributeError: unknown attribute: foo