README.md

# SandboxShim

Compile-time macros for wiring test sandbox infrastructure into Phoenix endpoints and LiveViews. Emits nothing outside `MIX_ENV=test`. Zero runtime overhead, no production dependencies on test libraries.

Part of [sandbox_case](https://hex.pm/packages/sandbox_case).

## Installation

```elixir
# mix.exs
{:sandbox_shim, "~> 0.1"},                    # all envs, just macros
{:sandbox_case, "~> 0.3", only: :test},       # test runtime
```

## Usage

```elixir
# endpoint.ex
import SandboxShim
sandbox_plugs()

sandbox_socket "/live", Phoenix.LiveView.Socket,
  websocket: [connect_info: [session: @session_options]]
```

```elixir
# your_app_web.ex
def live_view do
  quote do
    use Phoenix.LiveView
    import SandboxShim
    sandbox_on_mount()
  end
end
```

## License

MIT