ExUnit.Filters

Conveniences for parsing and evaluating filters.

Source

Summary

eval(include, exclude, tags)

Evaluates the include and exclude filters against the given tags. Expects filters to be normalized into a keyword list where each key is an atom and the value is a list

parse(filters)

Parses the given filters, as one would receive from the command line

Functions

eval(include, exclude, tags)

Specs:

Evaluates the include and exclude filters against the given tags. Expects filters to be normalized into a keyword list where each key is an atom and the value is a list.

Examples

iex> ExUnit.Filters.eval([foo: "bar"], [:foo], [foo: "bar"])
:ok

iex> ExUnit.Filters.eval([foo: "bar"], [:foo], [foo: "baz"])
{ :error, :foo }
Source
parse(filters)

Specs:

Parses the given filters, as one would receive from the command line.

Examples

iex> ExUnit.Filters.parse(["foo:bar", "baz"])
[{:foo, "bar"}, :baz]
Source