Skip to content

Commit f40a697

Browse files
committed
Remove deprecated TestFixtures.fixture_path
1 parent 4bf2c4c commit f40a697

File tree

3 files changed

+6
-23
lines changed

3 files changed

+6
-23
lines changed

activerecord/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
* Remove deprecated `TestFixtures.fixture_path`.
2+
3+
*Rafael Mendonça França*
4+
15
* Remove deprecated behavior to support referring to a singular association by its plural name.
26

37
*Rafael Mendonça França*

activerecord/lib/active_record/test_fixtures.rb

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,6 @@ def set_fixture_class(class_names = {})
5353
self.fixture_class_names = fixture_class_names.merge(class_names.stringify_keys)
5454
end
5555

56-
def fixture_path # :nodoc:
57-
ActiveRecord.deprecator.warn(<<~WARNING)
58-
TestFixtures.fixture_path is deprecated and will be removed in Rails 7.2. Use .fixture_paths instead.
59-
If multiple fixture paths have been configured with .fixture_paths, then .fixture_path will just return
60-
the first path.
61-
WARNING
62-
fixture_paths.first
63-
end
64-
65-
def fixture_path=(path) # :nodoc:
66-
ActiveRecord.deprecator.warn("TestFixtures.fixture_path= is deprecated and will be removed in Rails 7.2. Use .fixture_paths= instead.")
67-
self.fixture_paths = Array(path)
68-
end
69-
7056
def fixtures(*fixture_set_names)
7157
if fixture_set_names.first == :all
7258
raise StandardError, "No fixture path found. Please set `#{self}.fixture_paths`." if fixture_paths.blank?
@@ -111,15 +97,6 @@ def uses_transaction?(method)
11197
end
11298

11399
private
114-
def fixture_path
115-
ActiveRecord.deprecator.warn(<<~WARNING)
116-
TestFixtures#fixture_path is deprecated and will be removed in Rails 7.2. Use #fixture_paths instead.
117-
If multiple fixture paths have been configured with #fixture_paths, then #fixture_path will just return
118-
the first path.
119-
WARNING
120-
fixture_paths.first
121-
end
122-
123100
def run_in_transaction?
124101
use_transactional_tests &&
125102
!self.class.uses_transaction?(name)

guides/source/7_2_release_notes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ Please refer to the [Changelog][active-record] for detailed changes.
136136

137137
* Remove deprecated behavior to support referring to a singular association by its plural name.
138138

139+
* Remove deprecated `TestFixtures.fixture_path`.
140+
139141
### Deprecations
140142

141143
* Deprecate `Rails.application.config.active_record.allow_deprecated_singular_associations_name`

0 commit comments

Comments
 (0)