Fluffy.Test (Fluffy v0.2.0)

Copy Markdown View Source

ExUnit lifecycle setup for Fluffy tests.

Summary

Functions

Establishes Fluffy lifecycle management for the current ExUnit test.

Types

setup_option()

@type setup_option() ::
  {:repos, [atom()]} | {:sandbox, boolean()} | {:timeout, pos_integer()}

Functions

setup(context, options \\ [])

@spec setup(map(), [setup_option()]) :: :ok

Establishes Fluffy lifecycle management for the current ExUnit test.

Call this from the test case's setup callback before starting sessions. When Ecto repositories are configured, Fluffy also starts or adopts their SQL sandbox ownership. Pass sandbox: false to establish lifecycle management without database ownership.

Options