View Source Hologram.Commons.TestUtils (hologram v0.2.0)

Summary

Functions

Builds an error message for ArgumentError.

Returns the given argument. It prevents compiler warnings in tests when the given value is not permitted is specific situation.

Functions

build_argument_error_msg(arg_idx, blame)

@spec build_argument_error_msg(integer(), String.t()) :: String.t()

Builds an error message for ArgumentError.

build_function_clause_error_msg(fun_name, args \\ [], attempted_clauses \\ [])

@spec build_function_clause_error_msg(String.t(), list(), list()) :: String.t()

Builds an error message for FunctionClauseError.

build_undefined_function_error(undefined_mfa, similar_funs \\ [], module_available? \\ true)

@spec build_undefined_function_error(mfa(), [{(... -> any()), arity()}], boolean()) ::
  String.t()

Builds an error message for UndefinedFunctionError.

pid(str)

See IEx.Helpers.pid/1.

port(str)

See IEx.Helpers.port/1.

ref(str)

See IEx.Helpers.ref/1.

wrap_term(value)

@spec wrap_term(any()) :: any()

Returns the given argument. It prevents compiler warnings in tests when the given value is not permitted is specific situation.