lib/rubocop/cop/rspec/describe_method.rb in rubocop-rspec-1.32.0 vs lib/rubocop/cop/rspec/describe_method.rb in rubocop-rspec-1.33.0
- old
+ new
@@ -19,13 +19,13 @@
class DescribeMethod < Cop
include RuboCop::RSpec::TopLevelDescribe
include RuboCop::RSpec::Util
MSG = 'The second argument to describe should be the method '\
- "being tested. '#instance' or '.class'.".freeze
+ "being tested. '#instance' or '.class'."
def on_top_level_describe(_node, (_, second_arg))
- return unless second_arg && second_arg.str_type?
+ return unless second_arg&.str_type?
return if second_arg.str_content.start_with?('#', '.')
add_offense(second_arg, location: :expression)
end
end