Git Product home page Git Product logo

Comments (20)

esttorhe avatar esttorhe commented on August 16, 2024

We could use OHHTTPStubs or VCR (can't remember the correct name; as soon as I remember I'll update it here)

from xcodeserversdk.

cojoj avatar cojoj commented on August 16, 2024

Well whet it comes to mocking I've recently read this cool article. But yes I agree that we need some solution to test this.

from xcodeserversdk.

esttorhe avatar esttorhe commented on August 16, 2024

ahhhh; thanks @cojoj, DVR was the one I was thinking about; that's the one that Orta uses at Artsy; I wrote one called Rec but is not working correctly on Swift 2.0 and that's why I'm not suggesting that one :p

from xcodeserversdk.

cojoj avatar cojoj commented on August 16, 2024

Well, I've heard a lot of good about OHHTTPStubs but Objective-C - it hurts, lika a lot! 😜

from xcodeserversdk.

czechboy0 avatar czechboy0 commented on August 16, 2024

I like the approach mentioned in the article. Let me take a 👀.

from xcodeserversdk.

esttorhe avatar esttorhe commented on August 16, 2024

It's written in Obj-C but its compatible with Swift (more so if we use CocoaPods and just set the variable use_frameworks!).

You can see it in action on Ash Furrow's Moya.

The Demo uses OHHTTPStubs on its tests.

from xcodeserversdk.

czechboy0 avatar czechboy0 commented on August 16, 2024

Ok, DVR isn't on Cocoapods, let me try with Carthage (this is my first time, be patient).

from xcodeserversdk.

cojoj avatar cojoj commented on August 16, 2024

I guess, that's the point when we have to get back to #5. There's no other way for us to handle mocking/stubbing without third-party, right?

from xcodeserversdk.

esttorhe avatar esttorhe commented on August 16, 2024

@czechboy0 as long as its on a public Github and has a shared scheme its going to be available in Carthage

from xcodeserversdk.

czechboy0 avatar czechboy0 commented on August 16, 2024

@cojoj This is exactly an example of where I much prefer to use a third party solution, instead of rolling my own. The recording approach is very simple and pretty much exactly how I was planning to do it manually anyway.

from xcodeserversdk.

czechboy0 avatar czechboy0 commented on August 16, 2024

@esttorhe Cool, reading the docs of Carthage atm.

from xcodeserversdk.

czechboy0 avatar czechboy0 commented on August 16, 2024

Carthage-related question: should I put the whole Carthage folder into gitignore? Or just the checkout? Or just the build? Or both?

from xcodeserversdk.

esttorhe avatar esttorhe commented on August 16, 2024

TBH I've seen people checking in everything.

That depends on how you want to link. Some people use Carthage with update --no-build and only download the source and integrate the projects to their project inside a workspace (meaning you won't end up with Builds folder at all)

Or you could depend on Carthage to generate the frameworks and just add the generated package; which means that you'll have to keep the Builds folder on the repo.

from xcodeserversdk.

esttorhe avatar esttorhe commented on August 16, 2024

Personally I just commit everything and depending on the project I use workspaces with the source code rather than the .frameworks

from xcodeserversdk.

czechboy0 avatar czechboy0 commented on August 16, 2024

Ok, I did something in between: ad1e5e2. I went for the full manual approach, using Carthage to just pull the repo into its folder, but not build it. Then, I added the project as a subproject to XcodeServerSDK and added the appropriate dependencies for building and linking. But, since the code is not ours, I added the Checkouts folder to gitignore, so when this gets merged, you guys will need to run carthage update --no-build (which I also added to the README).

Let me know if this is a reasonable approach or not.

from xcodeserversdk.

czechboy0 avatar czechboy0 commented on August 16, 2024

When it comes to this issue, thanks guys, I think I'll try DVR for now. I'll reopen if it doesn't work well.

from xcodeserversdk.

esttorhe avatar esttorhe commented on August 16, 2024

👌 sounds good

from xcodeserversdk.

czechboy0 avatar czechboy0 commented on August 16, 2024

Ok, now we can actually start using it :)

from xcodeserversdk.

cojoj avatar cojoj commented on August 16, 2024

Bravo 👏 Hope that DVR will work for us!

from xcodeserversdk.

cojoj avatar cojoj commented on August 16, 2024

Puls, nice job with advertising XcodeServerSDK 👍

from xcodeserversdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.