From 1f58fea72f8483797f2e89422b4ea90b9b70c6c4 Mon Sep 17 00:00:00 2001 From: Sean Warren Date: Tue, 3 Dec 2024 09:54:56 -0500 Subject: [PATCH] Fix deprecation warning about fixture_paths --- spec/rails_helper.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 0905674a..45b7ca53 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -16,8 +16,9 @@ ActiveJob::Base.queue_adapter = :inline RSpec.configure do |config| - # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures - config.fixture_path = Rails.root.join("spec", "fixtures") + # Note that as of Rails 7, "fixture_path" is deprecated. You have to call "fixture_paths.first" instead. + config.fixture_paths = [] + config.fixture_paths << Rails.root.join("spec", "fixtures").to_s # 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