@@ -161,26 +161,52 @@ def in_inferring_type_from_location_environment
161161 include_examples "infers type from location" , :feature , "spec/features"
162162 end
163163
164- it "fixture support is included with metadata `:use_fixtures`" do
165- in_sub_process do
166- a_hash = an_instance_of ( Hash )
167- if ::Rails ::VERSION ::STRING >= "7.1.0"
168- expect ( RSpec ) . to receive ( :deprecate ) . with ( "config.fixture_path = \" custom/path\" " , a_hash )
169- end
170-
164+ if ::Rails ::VERSION ::STRING >= "7.2.0"
165+ it "fixture support is included with metadata `:use_fixtures`" do
171166 RSpec . configuration . global_fixtures = [ :foo ]
172- RSpec . configuration . fixture_path = "custom/path"
167+ RSpec . configuration . fixture_paths = [ "custom/path" ]
173168
174169 group = RSpec . describe ( "Arbitrary Description" , :use_fixtures )
175170
176- expect ( group ) . to respond_to ( :fixture_path )
171+ expect ( group . fixture_paths ) . to eq ( [ "custom/path" ] )
177172
178- if ::Rails ::VERSION ::STRING >= "7.1.0"
179- with_isolated_stderr { expect ( group . fixture_path ) . to eq ( "custom/path" ) }
180- else
181- expect ( group . fixture_path ) . to eq ( "custom/path" )
173+ expect ( group . new . respond_to? ( :foo , true ) ) . to be ( true )
174+ end
175+ elsif ::Rails ::VERSION ::STRING >= "7.1.0"
176+ it "fixture support is included with metadata `:use_fixtures`" do
177+ in_sub_process do
178+ a_hash = an_instance_of ( Hash )
179+ if ::Rails ::VERSION ::STRING >= "7.1.0"
180+ expect ( RSpec ) . to receive ( :deprecate ) . with ( "config.fixture_path = \" custom/path\" " , a_hash )
181+ end
182+
183+ RSpec . configuration . global_fixtures = [ :foo ]
184+ RSpec . configuration . fixture_path = "custom/path"
185+
186+ group = RSpec . describe ( "Arbitrary Description" , :use_fixtures )
187+
188+ if ::Rails ::VERSION ::STRING <= "7.2.0"
189+ expect ( group ) . to respond_to ( :fixture_path )
190+ end
191+
192+ if ::Rails ::VERSION ::STRING >= "7.1.0"
193+ with_isolated_stderr { expect ( group . fixture_path ) . to eq ( "custom/path" ) }
194+ else
195+ expect ( group . fixture_path ) . to eq ( "custom/path" )
196+ end
197+
198+ expect ( group . new . respond_to? ( :foo , true ) ) . to be ( true )
182199 end
200+ end
201+ else
202+ it "fixture support is included with metadata `:use_fixtures`" do
203+ RSpec . configuration . global_fixtures = [ :foo ]
204+ RSpec . configuration . fixture_path = "custom/path"
183205
206+ group = RSpec . describe ( "Arbitrary Description" , :use_fixtures )
207+
208+ expect ( group ) . to respond_to ( :fixture_path )
209+ expect ( group . fixture_path ) . to eq ( "custom/path" )
184210 expect ( group . new . respond_to? ( :foo , true ) ) . to be ( true )
185211 end
186212 end
0 commit comments