[rspec-users] Unexpected message on :attr_accessor

Jonathan Linowes jonathan at parkerhill.com
Tue Dec 4 15:54:43 EST 2007


>>
>> 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)



More information about the rspec-users mailing list