Class: RuboCop::Cop::RSpec::VerifiedDoubles
- Defined in:
- lib/rubocop/cop/rspec/verified_doubles.rb
Overview
Prefer using verifying doubles over normal doubles.
Constant Summary collapse
- MSG =
'Prefer using verifying doubles over normal doubles.'.freeze
Constants inherited from Cop
Cop::DEFAULT_CONFIGURATION, Cop::DEFAULT_PATTERN_RE
Constants included from RSpec::Language
Instance Method Summary collapse
Methods inherited from Cop
Instance Method Details
#on_send(node) ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/rubocop/cop/rspec/verified_doubles.rb', line 32 def on_send(node) unverified_double(node) do |name| return if name.sym_type? && cop_config['IgnoreSymbolicNames'] add_offense(node, location: :expression) end end |