trivago/Dobby

Include mock implementations

Opened this issue · 3 comments

tibr commented

How about including mocks for common iOS classes like NSURLSession?

was there any work done on this?

I have a generic NSUserDefaults mock / stub that I can contribute, and more to come, and I'd like to share them. should I create a separate repository or would you prefer to include it here?

thanks for the library by the way, it's very useful!

Hey @itchingpixels, we do have some reusable mocks/stubs internally but haven't put any work into making them open source yet. Maybe we could provide them as subspec via CocoaPods or additional target via Carthage? The other option, as you suggested, would be another repository. We should also have a look at the new Swift Package Manager before deciding about this?!

I'm glad to hear you like it, please let me know if you have any other feedback/ideas 🙂

Hi! That's a good question. I think it mainly depends on whether you'd like to encourage these extensions to be maintained by 3rd parties, or the library authors themselves.
Like if there's a breaking change, syntax and unit tests will be potentially broken for the extensions, and that will require more work from core contributors.

I think 3rd party repositories may introduce some discoverability problems, where the users end up reimplementing the wheel, unless maybe if they're listed in the README of the main project.

If you ask me personally, I'd like to use them via a Cocoapods subspec.

What do the contributors think about this (I see that's mainly you @felixjendrusch )? Are they willing to take on the extra work of maintaining the bindings for various iOS SDKs?

I'm happy to contribute and maintain some parts of it.