Rspec Mocking: ActiveRecord::AssociationTypeMismatch
问题 I'm new to Rspec and trying to set up a test for a User Profile. Profile belongs_to User. Now, I have an API integration with a third party site that works through the User Model, but some of the information for that API link is contained in Profile, so I have an "after_update" filter on Profile that tells the parent user to save, which triggers an update of the API. I'm trying to write a test for this, and I'm getting an ActiveRecord::AssociationTypeMismatch. The reason is I'm using a mock