From 7d971b094bb001b08ed3e2d33f0c9a17a80428c4 Mon Sep 17 00:00:00 2001 From: Carlos Silva Date: Fri, 5 Jan 2024 15:20:41 -0300 Subject: [PATCH] Only test query constraints on Rails 7.1 onwards --- spec/tests/has_many_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/tests/has_many_spec.rb b/spec/tests/has_many_spec.rb index 8990972..80f2af8 100644 --- a/spec/tests/has_many_spec.rb +++ b/spec/tests/has_many_spec.rb @@ -206,6 +206,8 @@ let(:activity) { Activity.create! } before do + skip('Only Rails 7.1 onwards') unless Post.respond_to?(:query_constraints) + Post.query_constraints :author_id, :id Activity.query_constraints :author_id, :id Activity.has_many :posts