[rspec-users] How to mock an association

Wes Shaddix wshaddix at gmail.com
Mon Feb 11 06:43:30 EST 2008

I've got a "group" model that has a user_id attribute and a 
validates_existence_of :user and validates_presence_of :user_id 
validations. What method(s) do I need to stub on the User mock to 
intercept those validation calls? My goal is to isolate the Group model 
from the User model.



More information about the rspec-users mailing list