File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,11 @@ module FixtureSupport
22
22
# /TODO
23
23
24
24
self . fixture_path = RSpec . configuration . fixture_path
25
- self . use_transactional_fixtures = RSpec . configuration . use_transactional_fixtures
25
+ if ::Rails ::VERSION ::STRING > '5'
26
+ self . use_transactional_tests = RSpec . configuration . use_transactional_fixtures
27
+ else
28
+ self . use_transactional_fixtures = RSpec . configuration . use_transactional_fixtures
29
+ end
26
30
self . use_instantiated_fixtures = RSpec . configuration . use_instantiated_fixtures
27
31
fixtures RSpec . configuration . global_fixtures if RSpec . configuration . global_fixtures
28
32
end
Original file line number Diff line number Diff line change @@ -196,8 +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 = double ( "Rails module" , :application => a_rails_app )
200
- stub_const "Rails" , the_rails_module
199
+ the_rails_module = Module . new
200
+ allow ( the_rails_module ) . to receive ( :application ) { a_rails_app }
201
+ stub_const "Rails" , the_rails_module , :transfer_nested_constants => true
201
202
202
203
group = RSpec . describe ( "Some Request API" , :type => :request )
203
204
@@ -227,8 +228,9 @@ def in_inferring_type_from_location_environment
227
228
228
229
it "metadata `:type => :feature` sets up feature example groups" do
229
230
a_rails_app = double ( "Rails application" )
230
- the_rails_module = double ( "Rails module" , :application => a_rails_app )
231
- stub_const "Rails" , the_rails_module
231
+ the_rails_module = Module . new
232
+ allow ( the_rails_module ) . to receive ( :application ) { a_rails_app }
233
+ stub_const "Rails" , the_rails_module , :transfer_nested_constants => true
232
234
233
235
group = RSpec . describe ( "Some feature description" , :type => :feature )
234
236
example = group . new
You can’t perform that action at this time.
0 commit comments