« Return to Thread: Unexpected message on :attr_accessor

Re: Unexpected message on :attr_accessor

by Jonathan Linowes :: Rate this Message:

Reply to Author | View in Thread

err, that suggestion was supposed to read @user.should_set...
etc

On Dec 4, 2007, at 3:54 PM, Jonathan Linowes wrote:

>
>>>
>>> This should be:
>>>
>>> @user.should_receive(:password_confirmation=)
>>>
>>
>> Lots of beginners make this mistake. Maybe RSpec's mock framework
>> should be smart enough to suggest this fix by itself.
>>
>> Patch anyone?
>>
>> Aslak
>>>
>
> perhaps be even more explicit that it's an accessor, like
>
> User.should_set(:password_confirmation)
> User.should_get(:password_confirmation)
>
> _______________________________________________
> rspec-users mailing list
> rspec-users@...
> http://rubyforge.org/mailman/listinfo/rspec-users

_______________________________________________
rspec-users mailing list
rspec-users@...
http://rubyforge.org/mailman/listinfo/rspec-users

 « Return to Thread: Unexpected message on :attr_accessor