erikdoe/ocmock
Mock objects for Objective-C observed · 2026-08-28
Health v2 · maintenance only
23/100
- Activity 0
- Release rhythm 8
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 5492
- days_rel: n/a
- days_push: 794
- n_releases_24m: 0
Adoption not part of the score
2171 stars · 608 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
OCMock is an Objective-C implementation of mock objects for unit testing, supporting stubs, dynamic mocks, partial mocks, and strict expectations. It integrates with Xcode test targets via CocoaPods or Carthage for both iOS and macOS development.
Use cases
- stub method return values in Objective-C unit tests
- verify interactions between objects in tests
- mock NSUserDefaults and other system classes
- create partial mocks to override methods on real objects
- mock protocols and class methods
- write strict mocks that fail on unexpected calls
When to choose
- writing unit tests for Objective-C code on iOS or macOS
- you need stubs, verification, or partial mocks in XCTest
- you want a mature, well-documented mocking library for Apple platforms
When to avoid
- testing Swift-only code where Swift-native mocking may fit better
- non-Apple platforms or non-Objective-C runtimes
Facets
library · maturity stable
mocking testing testing developer-tools cross-platform objective-c mock-objects unit-testing stubs xcode macos ios
3 sources
- readme: https://github.com/erikdoe/ocmock · fetched 2026-08-28 · 29dc6ae8114a
- homepage: http://ocmock.org · fetched 2026-08-29 · 8f4c29945fc6
- site_page: https://ocmock.org/reference · fetched 2026-08-29 · 1d9254942e4d
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| erikdoe/ocmock | main | 23 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem