On Sep 3, 2008, at 10:40 AM, MaurĂ­cio Linhares wrote:

You don't need to set the instance variable, you can stub the find call:


Or you could also stub the call to User::find.

Also - you don't *WANT* to set the instance variable - it's an encapsulation violation - there is nothing in the public interface about it. Remember, these are not only specs, but *examples*. Would you want someone writing production code modeled off of that spec?

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

Reply via email to