Brightify / Cuckoo

Boilerplate-free mocking framework for Swift!
MIT License
1.67k stars 174 forks source link

How to mock Singleton #427

Closed glve1027 closed 2 years ago

glve1027 commented 2 years ago
class Dog {
    static let shared = Dog()
    private init() {}
}
MatyasKriz commented 2 years ago

AFAIK inheritance-based mocking frameworks can't really mock singletons. 😕