Rspec 3 Resignation Warning: Filtering on the sub-step of example_group is out of date. Use sub-bowl to filter directly

When I run my Rspec version 3 tests, I receive the following failure warnings:

Subfile filtering :example_group deprecated. Instead, use a sub-bowl for filtering. Called from /path/to/file.rb:6: in `block in '.

Subfile filtering :example_group deprecated. Instead, use a sub-bowl for filtering. Called from /path/to/file.rb:8: in `block in '.

In path / to / file.rb:

 RSpec.configure do |config| module MyCodeHelpers # end config.include MyCodeHelpers, example_group: { :file_path => %r(spec/services/my_code) } config.before(:all, example_group: { :file_path => %r(spec/services/my_code) }) do @stub = true end end 

Does this just mean removing "example_group: {}" around the value: file_path (see below)?

 config.include MyCodeHelpers, :file_path => %r(spec/services/my_code) 

and

 config.before(:all, :file_path => %r(spec/services/my_code)) do @stub = true end 
+7
ruby-on-rails rspec
source share
1 answer

Yes, that’s exactly what he says. It is used both when setting up metadata and when using metadata, either by querying or using a filter to filter config.include

For a full explanation of the reasons, see this commit , but in a nutshell they thought it was confused for the example group metadata to have the example_group key when this hash has only metadata for the example group

+4
source share

All Articles