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 the ability to specify the Access-level modifier of the Spy #68

Open
tachyonics opened this issue Nov 16, 2023 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@tachyonics
Copy link

tachyonics commented Nov 16, 2023

Is your feature request related to a problem? Please describe.
Given that it is currently not possible to generate a spy from a pre-existing protocol, it may be useful to centralize whatever work-around is used in a separate target or package. This will likely require an Access-level modifier other than internal.

Describe the solution you'd like
At a minimum, the modifier of the spy should match the modifier of the protocol but to be more flexible having an explicit flag to indicate the modifier required could be useful.

@Matejkob
Copy link
Owner

I believe we can introduce this feature as an option. I'm not fond of the idea of automatically generating access levels by default. In most use cases, folks can import the module in which the spy declaration resides by using the @testable attribute on the import statement.

@Matejkob Matejkob added the enhancement New feature or request label Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants