Closed tinder-richardchildress closed 1 year ago
@tinder-richardchildress
check your mockolo script in your build phases, make sure that ur protocol B is defined inside the source directory of the script.
./mockolo -s ./protocolB.swift -d ./OutputMocks.swift
stackoverflow
If your protocol extends to another protocol that was defined in a different module/target. You can include the generated mock/mocks after the -mock flag (for multiple files put a space between them)
./mockolo -s YourSourcePath -mocks OtherModulePath/TestProtocolMocks.swift -d OutputPath/Mocks.swift
Howdy! I am trying to generate a mock for a protocol that inherits from other protocols using protocol composition. When testing this, I tried the following:
And the result of generating mocks was the following:
which fails to compile as TestProtocolMock does not conform to SecondSwiftProtocol. Interestingly, if I wrap the conformance:
The mock is:
Additionally, if I use a typealias, I get the same empty init mock as when I wrap the conformance.
Looking for any insight as to why this may be happening. Thank you!