Skip to content

Commit 84bd330

Browse files
committed
Merge pull request #2720 from rspec/more-details-to-change-fixture-paths
Provide more tips to how to migrate to fixture_paths
1 parent b04780f commit 84bd330

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/rspec/rails/configuration.rb

+4-2
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ def fixture_path
170170
RSpec.deprecate(
171171
"config.fixture_path",
172172
replacement: "config.fixture_paths",
173-
message: "Rails 7.1 has deprecated the singular fixture_path in favour of an array"
173+
message: "Rails 7.1 has deprecated the singular fixture_path in favour of an array." \
174+
"You should migrate to plural:"
174175
)
175176
fixture_paths&.first
176177
end
@@ -179,7 +180,8 @@ def fixture_path=(path)
179180
RSpec.deprecate(
180181
"config.fixture_path = #{path.inspect}",
181182
replacement: "config.fixture_paths = [#{path.inspect}]",
182-
message: "Rails 7.1 has deprecated the singular fixture_path in favour of an array"
183+
message: "Rails 7.1 has deprecated the singular fixture_path in favour of an array." \
184+
"You should migrate to plural:"
183185
)
184186
self.fixture_paths = Array(path)
185187
end

0 commit comments

Comments
 (0)