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

Mark any_instance proxy methods as private if they were private #1596

Merged
merged 3 commits into from
Oct 19, 2024

Conversation

JonRowe
Copy link
Member

@JonRowe JonRowe commented Oct 2, 2024

For expect|allow_any_instance_of(...) we restored, and had tests for, method visibility such that private methods remained private after tests, but we did not actually make the proxy methods private... So when defining such methods we mark them as private if they were previously true for private_method_defined?, fixes #1584

@JonRowe JonRowe force-pushed the fix-any-instance-private-method-visibility branch from 6330e3b to b9a7c04 Compare October 19, 2024 13:13
@JonRowe JonRowe merged commit 73eb4f5 into main Oct 19, 2024
30 checks passed
@JonRowe JonRowe deleted the fix-any-instance-private-method-visibility branch October 19, 2024 13:30
JonRowe added a commit that referenced this pull request Oct 19, 2024
…isibility

Mark any_instance proxy methods as private if they were private
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.

expect_any_instance_of(…).not_to receive(…) makes a private instance method public
1 participant