# frozen_string_literal: true module RuboCop module Cop module RSpec # Checks for consistent message expectation style. # # This cop can be configured in your configuration using the # `EnforcedStyle` option and supports `--auto-gen-config`. # # @example `EnforcedStyle: allow` # # # bad # expect(foo).to receive(:bar) # # # good # allow(foo).to receive(:bar) # # @example `EnforcedStyle: expect` # # # bad # allow(foo).to receive(:bar) # # # good # expect(foo).to receive(:bar) # class MessageExpectation < Cop include ConfigurableEnforcedStyle MSG = 'Prefer `%