Skip to content

Commit

Permalink
use plurial fixture_paths for rails 7.1+
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieujobin committed Jul 9, 2024
1 parent 243207f commit 4febfcb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,11 @@ def fail(msg)

config.mock_with :rspec

# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
config.fixture_path = "#{Rails.root}/spec/fixtures"
if Rails.version >= "7.1"
config.fixture_paths = ["#{::Rails.root}/spec/fixtures"]
else
config.fixture_path = "#{::Rails.root}/spec/fixtures"
end

# If you're not using ActiveRecord, or you'd prefer not to run each of your
# examples within a transaction, remove the following line or assign false
Expand Down

0 comments on commit 4febfcb

Please sign in to comment.