ruby on rails - Rspec 3 Deprecation Warning: Filtering by an example_group subhash is deprecated. Use the subhash to filter directly instead -
when running rspec version 3 tests, following deprecation warnings:
filtering :example_group subhash deprecated. use subhash filter directly instead. called /path/to/file.rb:6:in `block in '.
filtering :example_group subhash deprecated. use subhash filter directly instead. called /path/to/file.rb:8:in `block in '.
from path/to/file.rb:
rspec.configure |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) }) @stub = true end end does mean removing 'example_group: {}' around :file_path value (see below)?
config.include mycodehelpers, :file_path => %r(spec/services/my_code) and
config.before(:all, :file_path => %r(spec/services/my_code)) @stub = true end
yes, it's saying. applies both when setting metadata , when using metadata, either querying or using filter config.include
for full explanation of why, see this commit in nutshell thought confusing example group's metadata have key example_group when hash has metadata example group
Comments
Post a Comment