Skip to content

Commit 7d971b0

Browse files
committed
Only test query constraints on Rails 7.1 onwards
1 parent 6a192af commit 7d971b0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

spec/tests/has_many_spec.rb

+2
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,8 @@
206206
let(:activity) { Activity.create! }
207207

208208
before do
209+
skip('Only Rails 7.1 onwards') unless Post.respond_to?(:query_constraints)
210+
209211
Post.query_constraints :author_id, :id
210212
Activity.query_constraints :author_id, :id
211213
Activity.has_many :posts

0 commit comments

Comments
 (0)