thoughtbot / shoulda-matchers

Simple one-liner tests for common Rails functionality
https://matchers.shoulda.io
MIT License
3.5k stars 911 forks source link

Fixes for breaking changes in Rails 8 #1631

Closed theodorton closed 3 months ago

theodorton commented 3 months ago

I've been running tests against Rails main branch for one of my projects and noticed there are a couple things breaking in shoulda-matchers. Most of the things (so far) are resolved in this PR, and I've submitted a fix to Rails that solves a regression indicated by the shoulda-matcher test suite (see https://github.com/rails/rails/pull/51929).

Let me know if you'd like me to refactor and/or reword anything here.

I also think it would make sense to add tests against the main branch/Rails 8, but I'm unable to get the acceptance specs to play along nicely and I don't want to commit the appraisal I have for the unit specs as it depends on our fork of Rails to fully pass until the current changes are reviewed and I've figured out how to get the acceptance specs to run.

theodorton commented 3 months ago

I realize now that some of these issues will already happen at Rails 7.2 - I'll have to rebase and amend my commits accordingly.