diff --git a/lib/rspec/matchers/built_in/start_or_end_with.rb b/lib/rspec/matchers/built_in/start_or_end_with.rb index 81f06c288..7cec47a5a 100644 --- a/lib/rspec/matchers/built_in/start_or_end_with.rb +++ b/lib/rspec/matchers/built_in/start_or_end_with.rb @@ -58,7 +58,10 @@ def subsets_comparable? # we still provide this constant until 4.0. # @deprecated Use StartOrEndWith instead. # @private - StartAndEndWith = StartOrEndWith + def StartAndEndWith # rubocop:disable Naming/MethodName + RSpec.deprecate("`StartAndEndWith`", :replacement => "`StartOrEndWith`") + StartOrEndWith + end # @api private # Provides the implementation for `start_with`.