Implement `(allow|expect)_next_found_instance_of` mock helpers
Since ActiveRecord is instantiating the objects directly by calling `.allocate` on the model classes, mocking with `next_instance_of` mock helpers is not possible as it is depending on the `.new` method being called. To make it possible to mock next instance of ActiveRecord models, we had to implement a new set of mock helpers which rely on the `.allocate` method to be called.
Showing
Please register or sign in to comment