class RuboCop::Cop::RSpec::ImplicitExpect
def on_send(node)
def on_send(node) return unless (source_range = offending_expect(node)) expectation_source = source_range.source if expectation_source.start_with?(style.to_s) correct_style_detected else opposite_style_detected msg = offense_message(expectation_source) add_offense(source_range, message: msg) do |corrector| replacement = replacement_source(expectation_source) corrector.replace(source_range, replacement) end end end