lib/rubocop/cop/rspec/describe_symbol.rb in rubocop-rspec-1.32.0 vs lib/rubocop/cop/rspec/describe_symbol.rb in rubocop-rspec-1.33.0
- old
+ new
@@ -16,13 +16,13 @@
# # ...
# end
#
# @see https://github.com/rspec/rspec-core/issues/1610
class DescribeSymbol < Cop
- MSG = 'Avoid describing symbols.'.freeze
+ MSG = 'Avoid describing symbols.'
def_node_matcher :describe_symbol?, <<-PATTERN
- (send {(const nil? :RSpec) nil?} :describe $sym ...)
+ (send #{RSPEC} :describe $sym ...)
PATTERN
def on_send(node)
describe_symbol?(node) do |match|
add_offense(match, location: :expression)