Machete.BooleanMatcher (Machete v0.3.11)

View Source

Defines a matcher that matches boolean values

Summary

Types

Describes the arguments that can be passed to this matcher

t()

Describes an instance of this matcher

Functions

Matches against boolean values

Types

opts()

@type opts() :: []

Describes the arguments that can be passed to this matcher

t()

@opaque t()

Describes an instance of this matcher

Functions

boolean(opts \\ [])

@spec boolean(opts()) :: t()

Matches against boolean values

Takes no arguments

Examples:

iex> assert true ~> boolean()
true

iex> assert true ~> boolean()
true

iex> refute 1 ~> boolean()
false

iex> refute nil ~> boolean()
false