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 10, 2024
1 parent 6c27d90 commit 15eb36b
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 15eb36b

Please sign in to comment.