Skip to content

Commit

Permalink
Only test query constraints on Rails 7.1 onwards
Browse files Browse the repository at this point in the history
  • Loading branch information
crashtech committed Jan 5, 2024
1 parent 6a192af commit 7d971b0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec/tests/has_many_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7d971b0

Please sign in to comment.