diff --git a/Changelog.md b/Changelog.md index 374d20980..63201afda 100644 --- a/Changelog.md +++ b/Changelog.md @@ -13,6 +13,8 @@ Breaking Changes: * Remove support for present-tense dynamic predicate. (Phil Pirozhkov, #1286) * Prevent implicit blocks (e.g blocks as values) from being used with block matchers. (Phil Pirozhkov, #1285) +* Remove deprecated `match_regex` matcher. (Phil Pirozhkov, #1288) +* Remove deprecated `StartAndEndWith` matcher base class. (Phil Pirozhkov, #1288) Enhancements: diff --git a/lib/rspec/matchers.rb b/lib/rspec/matchers.rb index 114c176ee..0a0073e3b 100644 --- a/lib/rspec/matchers.rb +++ b/lib/rspec/matchers.rb @@ -687,15 +687,9 @@ def all(expected) # :c => { :d => (a_value < 3) } # } # ) - # - # @note The `match_regex` alias is deprecated and is not recommended for use. - # It was added in 2.12.1 to facilitate its use from within custom - # matchers (due to how the custom matcher DSL was evaluated in 2.x, - # `match` could not be used there), but is no longer needed in 3.x. def match(expected) BuiltIn::Match.new(expected) end - alias_matcher :match_regex, :match alias_matcher :an_object_matching, :match alias_matcher :a_string_matching, :match alias_matcher :matching, :match 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..95645fe6d 100644 --- a/lib/rspec/matchers/built_in/start_or_end_with.rb +++ b/lib/rspec/matchers/built_in/start_or_end_with.rb @@ -54,12 +54,6 @@ def subsets_comparable? end end - # For RSpec 3.1, the base class was named `StartAndEndWith`. For SemVer reasons, - # we still provide this constant until 4.0. - # @deprecated Use StartOrEndWith instead. - # @private - StartAndEndWith = StartOrEndWith - # @api private # Provides the implementation for `start_with`. # Not intended to be instantiated directly. diff --git a/spec/rspec/matchers/aliases_spec.rb b/spec/rspec/matchers/aliases_spec.rb index 5e4698ae7..ef5400ba6 100644 --- a/spec/rspec/matchers/aliases_spec.rb +++ b/spec/rspec/matchers/aliases_spec.rb @@ -276,14 +276,6 @@ module RSpec ).with_description('an object matching /foo/') end - specify do - expect( - match_regex(/foo/) - ).to be_aliased_to( - match(/foo/) - ).with_description('match regex /foo/') - end - specify do expect( matching(/foo/)