lib/rubocop/cop/rspec/describe_method.rb in rubocop-rspec-1.2.2 vs lib/rubocop/cop/rspec/describe_method.rb in rubocop-rspec-1.3.0

- old
+ new

@@ -24,10 +24,10 @@ "being tested. '#instance' or '.class'" METHOD_STRING_MATCHER = /^[\#\.].+/ def on_top_level_describe(_node, args) second_arg = args[1] - return unless second_arg + return unless second_arg && second_arg.type == :str return if METHOD_STRING_MATCHER =~ second_arg.children.first add_offense(second_arg, :expression, MESSAGE) end end