File tree 2 files changed +14
-3
lines changed
2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,12 @@ def run_in_transaction?
21
21
if RSpec . configuration . use_active_record?
22
22
include Fixtures
23
23
24
- self . fixture_path = RSpec . configuration . fixture_path
24
+ # TestFixtures#fixture_path is deprecated and will be removed in Rails 7.2
25
+ if respond_to? ( :fixture_paths= )
26
+ fixture_paths << RSpec . configuration . fixture_path
27
+ else
28
+ self . fixture_path = RSpec . configuration . fixture_path
29
+ end
25
30
self . use_transactional_tests = RSpec . configuration . use_transactional_fixtures
26
31
self . use_instantiated_fixtures = RSpec . configuration . use_instantiated_fixtures
27
32
Original file line number Diff line number Diff line change @@ -164,8 +164,14 @@ def in_inferring_type_from_location_environment
164
164
165
165
group = RSpec . describe ( "Arbitrary Description" , :use_fixtures )
166
166
167
- expect ( group ) . to respond_to ( :fixture_path )
168
- expect ( group . fixture_path ) . to eq ( "custom/path" )
167
+ if ::Rails ::VERSION ::STRING < '7.1.0'
168
+ expect ( group ) . to respond_to ( :fixture_path )
169
+ expect ( group . fixture_path ) . to eq ( "custom/path" )
170
+ else
171
+ expect ( group ) . to respond_to ( :fixture_paths )
172
+ expect ( group . fixture_paths ) . to include ( "custom/path" )
173
+ end
174
+
169
175
expect ( group . new . respond_to? ( :foo , true ) ) . to be ( true )
170
176
end
171
177
end
You can’t perform that action at this time.
0 commit comments