swift-spyable
swift-spyable copied to clipboard
Inherit protocol modifiers
- Allows protocols with any modifiers, like
public
,fileprivate
etc. to inherit this access on the spy and all the generated members. This is done by taking themodifiers
on the original protocol definition and applying it to all generated members.-
private
protocol members will inherit an access levelfileprivate
instead. Aprotocol
declaredprivate
at file-scope is effectively treated asfileprivate
. This access level on the generated members is required to satisfy the protocol requirements
-
- Generate an
init
with the same access level, allowing the spy to be created outside of the current module (as the default init level isinternal
). - Adds tests for all use cases.
- Closes #73 , fixes #72
Thanks for the great library! This is the best spy/mock generator out there atm.