View Source Machete.SupersetMatcher (Machete v0.3.1)

Defines a matcher that matches maps which are a superset of a specified map

Summary

Types

t()

Describes an instance of this matcher

Functions

Matches maps which are a superset of a specified map

Types

@opaque t()

Describes an instance of this matcher

Functions

@spec superset(map()) :: t()

Matches maps which are a superset of a specified map

Takes a map as its sole (mandatory) argument

Examples:

iex> assert %{a: 1} ~> superset(%{a: 1})
true

iex> assert %{a: 1, b: 1} ~> superset(%{a: 1})
true