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