From 03400b30fd3f4caf198391ebdede5388ce12a185 Mon Sep 17 00:00:00 2001 From: Benoit Tigeot Date: Wed, 6 Dec 2023 08:59:14 +0100 Subject: [PATCH] Provide more tips to how to migrate to fixture_paths Related: - https://github.com/rspec/rspec-rails/pull/2673#discussion_r1407925326 --- lib/rspec/rails/configuration.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/rspec/rails/configuration.rb b/lib/rspec/rails/configuration.rb index c21ed2e97..79f64e38d 100644 --- a/lib/rspec/rails/configuration.rb +++ b/lib/rspec/rails/configuration.rb @@ -170,7 +170,8 @@ def fixture_path RSpec.deprecate( "config.fixture_path", replacement: "config.fixture_paths", - message: "Rails 7.1 has deprecated the singular fixture_path in favour of an array" + message: "Rails 7.1 has deprecated the singular fixture_path in favour of an array." \ + "You should migrate to plural:" ) fixture_paths&.first end @@ -179,7 +180,8 @@ def fixture_path=(path) RSpec.deprecate( "config.fixture_path = #{path.inspect}", replacement: "config.fixture_paths = [#{path.inspect}]", - message: "Rails 7.1 has deprecated the singular fixture_path in favour of an array" + message: "Rails 7.1 has deprecated the singular fixture_path in favour of an array." \ + "You should migrate to plural:" ) self.fixture_paths = Array(path) end