Brightify / Cuckoo

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

OCMock with Swift Package Manager #416

Closed ajpallares closed 2 years ago

ajpallares commented 2 years ago

Fixes #335.

Note that because OCMock contains unsafeOptions, the dependency of OCMock has to be specified by a commit hash (see https://github.com/erikdoe/ocmock/pull/460#issuecomment-720786603).

ajpallares commented 2 years ago

Don't worry! I'm also rather new to SPM but the good thing about this is that we learn from it 😊

In any case, I didn't find any of your questions to be stupid at all! I think it's a good thing that you care a lot about this library and that you require minimum quality standards.

As for the #if directives, those seem a bit painful for me, especially as I expect to not get a feedback that I forgot one until after I try to do some SPM work, correct?

Totally agree. They are painful and easy to be forgotten in the future.

However, I do appreciate the PR and want to add support for SPM, I wouldn't want to block anyone from switching to their dependency manager of choice.

No problem. We'll get it working for sure. I'm already using Cuckoo with SPM in our project but I needed to add some ObjC mocks and the straightforward solution is to use Cuckoo + OCMock. So thank you for this amazing library! 🙌

MatyasKriz commented 2 years ago

Merged! Thanks a lot, @ajpallares, for this great PR and the research that you've put into making Cuckoo+OCMock work with SPM. 🙂