lib/rubocop/cop/rspec/metadata_style.rb in rubocop-rspec-3.0.4 vs lib/rubocop/cop/rspec/metadata_style.rb in rubocop-rspec-3.0.5
- old
+ new
@@ -43,16 +43,11 @@
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)
+ on_metadata_symbol(symbol) if symbol.sym_type?
end
return unless hash
hash.pairs.each do |pair|