lib/rubocop/cop/rspec/example_wording.rb in rubocop-rspec-1.33.0 vs lib/rubocop/cop/rspec/example_wording.rb in rubocop-rspec-1.34.0

- old
+ new

@@ -34,13 +34,15 @@ MSG_IT = "Do not repeat 'it' when describing your tests." SHOULD_PREFIX = /\Ashould(?:n't)?\b/i.freeze IT_PREFIX = /\Ait /i.freeze - def_node_matcher( - :it_description, - '(block (send _ :it $(str $_) ...) ...)' - ) + def_node_matcher :it_description, <<-PATTERN + (block (send _ :it ${ + (str $_) + (dstr (str $_ ) ...) + } ...) ...) + PATTERN def on_block(node) it_description(node) do |description_node, message| if message =~ SHOULD_PREFIX add_wording_offense(description_node, MSG_SHOULD)