File tree 3 files changed +23
-2
lines changed
3 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,12 @@ def self.proxy_method_warning_if_called_in_before_context_scope(method_name)
39
39
end
40
40
end
41
41
42
+ if ::Rails . version . to_f >= 6.1
43
+ def name
44
+ @example
45
+ end
46
+ end
47
+
42
48
fixtures RSpec . configuration . global_fixtures if RSpec . configuration . global_fixtures
43
49
end
44
50
end
Original file line number Diff line number Diff line change @@ -196,7 +196,9 @@ def in_inferring_type_from_location_environment
196
196
197
197
it "metadata `type: :request` sets up request example groups" do
198
198
a_rails_app = double ( "Rails application" )
199
- the_rails_module = Module . new
199
+ the_rails_module = Module . new {
200
+ def self . version ; end ;
201
+ }
200
202
allow ( the_rails_module ) . to receive ( :application ) { a_rails_app }
201
203
version = ::Rails ::VERSION
202
204
stub_const "Rails" , the_rails_module
@@ -230,7 +232,9 @@ def in_inferring_type_from_location_environment
230
232
231
233
it "metadata `type: :feature` sets up feature example groups" do
232
234
a_rails_app = double ( "Rails application" )
233
- the_rails_module = Module . new
235
+ the_rails_module = Module . new {
236
+ def self . version ; end ;
237
+ }
234
238
allow ( the_rails_module ) . to receive ( :application ) { a_rails_app }
235
239
version = ::Rails ::VERSION
236
240
stub_const "Rails" , the_rails_module
Original file line number Diff line number Diff line change @@ -13,5 +13,16 @@ module RSpec::Rails
13
13
expect ( group ) . to respond_to ( :fixture_path= )
14
14
end
15
15
end
16
+
17
+ it "will allow #setup_fixture to run successfully" , if : Rails . version . to_f > 6.0 do
18
+
19
+ group = RSpec ::Core ::ExampleGroup . describe do
20
+ include FixtureSupport
21
+
22
+ self . use_transactional_tests = false
23
+ end
24
+
25
+ expect { group . new . setup_fixtures } . to_not raise_error
26
+ end
16
27
end
17
28
end
You can’t perform that action at this time.
0 commit comments