Skip to content

Commit

Permalink
[expectations] Merge pull request rspec/rspec-expectations#1288 from …
Browse files Browse the repository at this point in the history
…rspec/remove-deprecations-2

Remove a couple of remaining deprecations

---
This commit was imported from rspec/rspec-expectations@dde2edc.
  • Loading branch information
pirj committed Feb 11, 2021
2 parents 282e20a + 1815bc1 commit a6ca5ec
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 20 deletions.
2 changes: 2 additions & 0 deletions rspec-expectations/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
6 changes: 0 additions & 6 deletions rspec-expectations/lib/rspec/matchers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 0 additions & 8 deletions rspec-expectations/spec/rspec/matchers/aliases_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand Down

0 comments on commit a6ca5ec

Please sign in to comment.