Skip to content

Commit

Permalink
use gem requirement test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexevanczuk committed Dec 12, 2023
1 parent 3b5e246 commit a526fc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tapioca/dsl/compilers/active_record_fixtures.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def fixture_loader
Class.new do
T.unsafe(self).include(ActiveRecord::TestFixtures)

if respond_to?(:fixture_paths=)
if ::Gem::Requirement.new(">= 7.1.0").satisfied_by?(Rails.gem_version)
T.unsafe(self).fixture_paths = [Rails.root.join("test", "fixtures")]
else
T.unsafe(self).fixture_path = Rails.root.join("test", "fixtures")
Expand Down

0 comments on commit a526fc8

Please sign in to comment.