Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove a couple of remaining deprecations #1288

Merged
merged 2 commits into from
Feb 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions 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 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
6 changes: 0 additions & 6 deletions lib/rspec/matchers/built_in/start_or_end_with.rb
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 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