mockolo icon indicating copy to clipboard operation
mockolo copied to clipboard

[BUG] Does not mock protocol requirements from other module

Open alexdremov opened this issue 1 year ago • 2 comments

If protocol#1 inherits protocol#2 imported from different module, then protocol#2 requirements are not met:

/// @mockable
protocol Foo: Equatable {
    func foo()
}
class FooMock: Foo {
    init() { }


    private(set) var fooCallCount = 0
    var fooHandler: (() -> ())?
    func foo()  {
        fooCallCount += 1
        if let fooHandler = fooHandler {
            fooHandler()
        }
        
    }
}

Which does not conform to Equatable

alexdremov avatar May 21 '23 20:05 alexdremov