Cuckoo
Cuckoo copied to clipboard
Provide a way to disambiguate types that exist in multiple frameworks
I have an issue where a type in my framework has the same name as one in Foundation. That leads to ambiguity in the generated mock code since no qualifier is used when referencing the type:
import Cuckoo
@testable import MyFrameWork
import Foundation
class MockTimer: Timer, Cuckoo.Mock {
typealias MocksType = Timer
...
In this case Timer is ambiguous. It would be better if the generated code looked like this:
import Cuckoo
@testable import MyFrameWork
import Foundation
class MockTimer: MyFrameWork.Timer, Cuckoo.Mock {
typealias MocksType = MyFrameWork.Timer
...
Supporting this may require some additional inputs to generate that indicate which framework a particular file should be scoped to.
I love the work that's been done on Cuckoo and am eager to see it flourish. However, this issue is currently blocking its adoption.