swift-spyable
swift-spyable copied to clipboard
Add the ability to specify the Access-level modifier of the Spy
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.
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.