# eranpeer/FakeIt

C++ mocking made easy. A simple yet very expressive, headers only library for c++ mocking.

Repository: https://github.com/eranpeer/FakeIt
Canonical: https://ross.abutalabs.com/products/fakeit
Language: C++
License: MIT
License Family: permissive
Last push: 2026-06-30T20:36:56+00:00

## Health v2 (maintenance only)
Score: 69/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 90, release rhythm 24, longevity 100
- inputs: {"age_days": 4749, "days_push": 64, "days_rel": 292, "gap_med": 403, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1370, forks 181 (observed 2026-08-28T04:04:31.952191+00:00)

## What it is
FakeIt is a header-only C++ mocking framework with an expressive C++11-based API for creating mock objects and verifying method invocations. It supports GCC, Clang, AppleClang, and MSVC, and integrates with GTest, MS Test, and Boost Test.

## Use cases
- mock interfaces in C++ unit tests
- stub method return values in C++ tests
- verify method calls with specific arguments
- spy on existing objects during testing
- integrate mocking with GTest or Boost Test

## When to choose
- you need a lightweight, single-header mocking library for C++11 or later
- you want expressive Arrange-Act-Assert style mock syntax
- you use GCC, Clang, or MSVC and need broad compiler support

## When to avoid
- you need mocking for C code without virtual interfaces
- you prefer a full test framework with built-in mocking like GoogleMock
- your project is restricted to pre-C++11 compilers

## Facets
- artifact type: library
- maturity: stable
- function: mocking, testing
- domain: testing, developer-tools
- platform: cpp, windows, cross-platform
- tags: header-only, cpp11, unit-testing, mock-objects, gtest-integration, spy, linux, macos

## Member repositories
- eranpeer/FakeIt (main) score 69

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:31.952191+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:40:54.863102+00:00, confidence not recorded.
  - readme: https://github.com/eranpeer/FakeIt (fetched 2026-08-28T04:04:31.952191+00:00, sha ef7ae5e76f31)
- Data as of 2026-08-30T08:39:29.467469+00:00.
