# `Attesto.Test.CodeStoreDelegates`
[🔗](https://github.com/XukuLLC/attesto/blob/v2.28.0/lib/attesto/test/code_store_delegates.ex#L1)

Overridable `Attesto.CodeStore` callback delegates for test doubles.

A host can wrap a real store and override only the callbacks a test needs
to observe or fault. The `:to` option selects the delegate target and
defaults to `Attesto.CodeStore.ETS`; the target must be started separately.

    defmodule Host.ObservedCodeStore do
      use Attesto.Test.CodeStoreDelegates, to: Attesto.CodeStore.ETS

      def claim(hash) do
        send(self(), {:claim, hash})
        super(hash)
      end
    end

The generated module implements every `Attesto.CodeStore` callback and
marks each one overridable. This helper has no ExUnit dependency.

# `__using__`
*macro* 

Define overridable code-store callbacks delegating to `:to` (ETS by default).

---

*Consult [api-reference.md](api-reference.md) for complete listing*
