From 6e39ab779ce99069ef21b5fd54397e366eee31e5 Mon Sep 17 00:00:00 2001 From: Pau Perez Date: Tue, 4 Aug 2020 11:24:49 +0200 Subject: [PATCH] Make RSpec infer the file type from its location Apparently, although we tend to add the type of spec file some RSpec methods are not working without it. We're getting: ``` NoMethodError: undefined method `helper' for RSpec::ExampleGroups::SpreeSharedOrderDetailsHtmlHaml:Class ``` ``` NameError: undefined local variable or method `controller' for # # ./spec/controllers/spree/admin/users_controller_spec.rb:10:in `block (3 levels) in ' ``` It needs more investigation but another day. --- spec/spec_helper.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 9ea40e8c66..9e42ff6191 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -201,4 +201,5 @@ RSpec.configure do |config| # config.after :suite do # PerfTools::CpuProfiler.stop # end + config.infer_spec_type_from_file_location! end