@@ -196,8 +196,11 @@ 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 )
199
+ the_rails_module = Module . new
200
+ allow ( the_rails_module ) . to receive ( :application ) { a_rails_app }
201
+ version = ::Rails ::VERSION
200
202
stub_const "Rails" , the_rails_module
203
+ stub_const 'Rails::VERSION' , version
201
204
202
205
group = RSpec . describe ( "Some Request API" , :type => :request )
203
206
@@ -227,8 +230,11 @@ def in_inferring_type_from_location_environment
227
230
228
231
it "metadata `:type => :feature` sets up feature example groups" do
229
232
a_rails_app = double ( "Rails application" )
230
- the_rails_module = double ( "Rails module" , :application => a_rails_app )
233
+ the_rails_module = Module . new
234
+ allow ( the_rails_module ) . to receive ( :application ) { a_rails_app }
235
+ version = ::Rails ::VERSION
231
236
stub_const "Rails" , the_rails_module
237
+ stub_const 'Rails::VERSION' , version
232
238
233
239
group = RSpec . describe ( "Some feature description" , :type => :feature )
234
240
example = group . new
0 commit comments