uber / uber/RIBs

Tutorial 2, Step "Unit testing"

Open
#347 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

iOS
Dominant language
Kotlin
Stars
7.9k
Forks
914
PR merge metrics
No merged PRs in 30d

Description

After following all the steps, and when it was time to build and run the tests on RootRouterTests.swift, the code wouldn't compile because LoggedInInteractableMock did not implement the gameDidStart method from OffGameListener (through LoggedInInteractable).

To fix it, I added the gameDidStart implementation with a counter for method calls, as well as a closure for providing an implementation stub.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Tutorial 2, Step “Unit testing” and inspect RootRouterTests.swift, especially LoggedInInteractableMock and its OffGameListener contract. Run the tutorial’s tests to reproduce the compilation failure; done means the mock satisfies the contract and the tests build and run successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile, testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.