Spectre.Eval.Result (Spectre v0.3.0)

Copy Markdown View Source

Result of comparing one routing receipt with its evaluation expectations.

Summary

Functions

Compares a receipt with one case.

Converts a result into a JSON-safe map.

Types

t()

@type t() :: %Spectre.Eval.Result{
  evaluation_case: Spectre.Eval.Case.t(),
  passed?: boolean(),
  receipt: Spectre.Router.Receipt.t(),
  violations: [violation()]
}

violation()

@type violation() :: %{
  :type => atom(),
  optional(:expected) => term(),
  optional(:actual) => term()
}

Functions

new(evaluation_case, receipt)

Compares a receipt with one case.

to_map(result)

@spec to_map(t()) :: map()

Converts a result into a JSON-safe map.