lib/rubocop/cop/rspec/metadata_style.rb in rubocop-rspec-2.24.1 vs lib/rubocop/cop/rspec/metadata_style.rb in rubocop-rspec-2.25.0

- old
+ new

@@ -43,9 +43,14 @@ def_node_matcher :match_ambiguous_trailing_metadata?, <<~PATTERN (send _ _ _ ... !{hash sym}) PATTERN def on_metadata(symbols, hash) + # RSpec example groups accept two string arguments. In such a case, + # the rspec_metadata matcher will interpret the second string + # argument as a metadata symbol. + symbols.shift if symbols.first&.str_type? + symbols.each do |symbol| on_metadata_symbol(symbol) end return unless hash