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

2011-11-20 Thread David Chelimsky
On Nov 20, 2011, at 2:46 AM, Patrick J. Collins wrote: >> I haven't used ActiveRecord in quite awhile (been using MongoDB), but it >> looks like you cannot instantiate a record with attributes that don't exist. >> I think you have two options here: >> >> 1.) Only use valid attributes in your pa

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

2011-11-20 Thread Patrick J. Collins
> I haven't used ActiveRecord in quite awhile (been using MongoDB), but it > looks like you cannot instantiate a record with attributes that don't exist. > I think you have two options here: > > 1.) Only use valid attributes in your params. > 2.) Add `with` to your stub to exactly match the argu

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

2011-11-20 Thread Justin Ko
On Nov 19, 2011, at 11:14 PM, Patrick J. Collins wrote: >> 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" } } >