Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
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