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

Add deprecation warnings for features to be removed/changed in RSpec 4 #1418

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pirj
Copy link
Member

@pirj pirj commented Mar 15, 2021

@pirj pirj self-assigned this Mar 15, 2021
@pirj pirj added this to the RSpec 4 milestone Mar 15, 2021
@pirj pirj force-pushed the add-major-update-deprecation-warnings branch from a74c7a7 to 445aa10 Compare March 15, 2021 16:13
@pirj pirj mentioned this pull request Nov 27, 2024
53 tasks
@pirj pirj force-pushed the add-major-update-deprecation-warnings branch 2 times, most recently from c192369 to 02fb699 Compare March 15, 2021 16:42
@@ -80,13 +80,23 @@ def add_stub_and_should_receive_to(*modules)
#
def syntax=(*values)
syntaxes = values.flatten
if self.class.warn_about_syntax?
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We call configuration.reset_syntaxes_to_default, and don't want a deprecation message to be emitted at that moment.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@pirj pirj force-pushed the add-major-update-deprecation-warnings branch from 02fb699 to f7da8b4 Compare March 15, 2021 18:17
@pirj pirj requested review from JonRowe and benoittgt March 15, 2021 18:17
@pirj pirj force-pushed the add-major-update-deprecation-warnings branch from f7da8b4 to 0968af2 Compare March 15, 2021 18:23
@pirj
Copy link
Member Author

pirj commented Mar 15, 2021

To prevent the build from failing, I had to comment out this in rspec-core:

# c.raise_errors_for_deprecations!

Made it part of rspec/rspec-core#2880.
It is possible to extract it to lead the pack, then all the builds should be green.

Copy link
Member

@benoittgt benoittgt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pirj
Copy link
Member Author

pirj commented Apr 9, 2021

This will become green when rspec/rspec-core#2880 is merged.
I have some time for Expectations counterpart PR, let's see how all three work together.

Still, preliminary code review is appreciated.

@pirj pirj changed the title Add RSpec 4 deprecations Add deprecation warnings for features to be removed/changed in RSpec 4 Jul 18, 2021
@pirj pirj modified the milestones: 4.0, 3.99 Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants