Class: RuboCop::Cop::RSpec::NotToNot
- Extended by:
- AutoCorrector
- Includes:
- ConfigurableEnforcedStyle
- Defined in:
- lib/rubocop/cop/rspec/not_to_not.rb
Overview
Checks for consistent method usage for negating expectations.
Constant Summary collapse
- MSG =
'Prefer `%<replacement>s` over `%<original>s`.'
Instance Method Summary collapse
Methods inherited from Base
inherited, #on_new_investigation
Methods included from RSpec::Language::NodePattern
Instance Method Details
#on_send(node) ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/rubocop/cop/rspec/not_to_not.rb', line 26 def on_send(node) not_to_not_offense(node, alternative_style) do add_offense(node.loc.selector) do |corrector| corrector.replace(node.loc.selector, style.to_s) end end end |