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
> 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
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" } }
>
> 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
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
> #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
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.
>>
>>
> > 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
Hi,
On Sat, Nov 19, 2011 at 09:42, Patrick J. Collins
wrote:
> I just spent a lot of time trying to get a test to pass that would not pass no
> matter what I did, and I finally decided to just do something really simple to
> verify that even that was working-- and it's not.
>
> class PostsControl
On Nov 18, 2011, at 7:42 PM, Patrick J. Collins wrote:
> I just spent a lot of time trying to get a test to pass that would not pass no
> matter what I did, and I finally decided to just do something really simple to
> verify that even that was working-- and it's not.
>
> class PostsController <
I just spent a lot of time trying to get a test to pass that would not pass no
matter what I did, and I finally decided to just do something really simple to
verify that even that was working-- and it's not.
class PostsController < ApplicationController
def create
debugger
11 matches
Mail list logo