[Rails 7] Get rid of db-query-matchers gem#7232
[Rails 7] Get rid of db-query-matchers gem#7232deivid-rodriguez merged 1 commit intoactiveadmin:masterfrom
Conversation
ab242b6 to
e6df0bc
Compare
|
Interesting. This dependency was introduced by #5811 The latest publisher of |
|
Is this dependency worth though? It is only used in two tests, which can be easily rewritten to check the same thing. For example we could subscribe to the |
|
If we can do the same thing through ActiveRecord notification subscription, I'd be ok with that and would approve. Ideally, we'd still want the database query check for these test cases. |
That is how db-query-matchers is implemented. I agree we should keep the SQL check. @alejandroperea do you want to improve the test to use the |
|
@rafaelfranca Sure! I'll take a look this weekend 👍 |
2ae618b to
f7cdccc
Compare
|
@rafaelfranca Done! It is the first time I use I've added an Rspec matcher for doing this, just in case we want to use it in another place in the future. |
f7cdccc to
da69461
Compare
deivid-rodriguez
left a comment
There was a problem hiding this comment.
Just a very small feedback that you're free to address but I'm good with the current version too. Thanks so much!
da69461 to
0c08626
Compare
|
I agree @deivid-rodriguez ! Change applied 👍 Thanks for the review! :) |
|
Thanks so much!! |
I've seen in this issue #7196 that
db-query-matchersgem is incompatible with Rails 7 and looks no longer maintained.I've introduced a custom Rspec matcher that subscribes to
sql.active_recordevent and checks if the passed query matches (or not) with the executed ones.