rspec / rspec-activemodel-mocks

Add stub_model and mock_model to rspec-mocks
MIT License
119 stars 32 forks source link

Mock === on the modal_class when defining a mock #55

Closed JonRowe closed 9 months ago

JonRowe commented 9 months ago

Rails 7.1 dropped a custom implementation of .=== for models (in https://github.com/rails/rails/commit/31482d286790587a906c52ababf2e354fc2d460f) which allowed our mocks to pass the case equality check, this was a side effect of code they'd written for another means but we can restore the desired behaviour by mocking === on the class when defining a mock_model.

Fixes #54

JonRowe commented 9 months ago

Released in 1.2.0