Sha256: aadc503748f783e18864eba91f6b337c66665cf9f1a23d3ffa98152ed9f00bf7
Contents?: true
Size: 773 Bytes
Versions: 11
Compression:
Stored size: 773 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop module RSpec # Avoid describing symbols. # # @example # # bad # describe :my_method do # # ... # end # # # good # describe '#my_method' do # # ... # end # # @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 ...) PATTERN def on_send(node) describe_symbol?(node) do |match| add_offense(match, location: :expression) end end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems