• Mehmet Emin INAC's avatar
    Implement `(allow|expect)_next_found_instance_of` mock helpers · acdc0b87
    Mehmet Emin INAC authored
    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.
    acdc0b87
gotchas.md 8.9 KB