Oh yes, forgot to add that, if you do self.current_user = user, it will call
your mock as expected.
Sorry for the multitude of emails.
2010/6/7 Vinícius Baggio Fuentes
> If current_user is an instance variable (as if you did attr_accessor
> :current_user), you should try:
> @cur
If current_user is an instance variable (as if you did attr_accessor
:current_user), you should try:
@current_user = @user
If not, you should try invoking with self:
self.current_user = @user
because ruby is creating a local variable named current_user instead of
invoking #current_user=. When you