Cringe.Assertions (cringe v0.3.0)

Copy Markdown View Source

ExUnit assertions for Cringe documents and apps.

Summary

Functions

assert_app_text(app, expected)

(macro)

assert_render(document, expected, opts \\ [])

(macro)

clean_heredoc(heredoc)

@spec clean_heredoc(String.t()) :: String.t()

Normalizes an expected multiline heredoc for render assertions.

Leading/trailing newlines are removed and common indentation is stripped, so expected terminal output can stay readable inside test modules.