ESpec.Expect

Defines helper functions for modules which use ESpec. These fucntions wraps arguments for ESpec.ExpectTo module.

Source

Summary

accepted(func, args \\ [])

Returns ESpec.ExpectTo argument to call ESpec.Assertions.ThrowTerm assertion

be(value)

Alias for eq/1

be(operator, value)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.Be asserion

be_atom()

Returns ESpec.ExpectTo argument to call ESpec.Assertions.ByType assertion

be_between(min, max)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.BeBetween asserion

be_binary()
be_bitstring()
be_boolean()
be_close_to(value, delta)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.BeBetween asserion

be_empty()

Returns ESpec.ExpectTo argument to call ESpec.Assertions.Enum.BeEmpty assertion

be_float()
be_function()
be_function(arity)
be_integer()
be_list()
be_map()
be_nil()
be_number()
be_pid()
be_port()
be_reference()
be_tuple()
change(func, value)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.ChangeTo assertion

change(func, before, value)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.ChangeFromTo assertion

eq(value)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.Eq asserion

eql(value)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.Eql asserion

expect(value)

Wrapper for ESpec.ExpectTo

have(val)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.Enum.Have assertion

have_all(func)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.Enum.HaveAll assertion

have_any(func)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.Enum.HaveAll assertion

have_at(pos, val)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.Enum.HaveAt assertion

have_count(val)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.Enum.HaveCount assertion

have_count_by(func, val)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.Enum.HaveCountBy assertion

have_first(value)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.List.HaveFirst assertion

have_hd(value)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.List.HaveHd assertion

have_last(value)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.List.HaveLast assertion

have_max(value)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.Enum.HaveMax assertion

have_max_by(func, value)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.Enum.HaveMaxBy assertion

have_min(value)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.Enum.HaveMin assertion

have_min_by(func, value)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.Enum.HaveMinBy assertion

have_tl(value)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.List.HaveTl assertion

match(value)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.Match asserion

raise_exception()
raise_exception(exception)
raise_exception(exception, message)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.RaiseException asserion

throw_term()
throw_term(term)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.ThrowTerm asserion

Functions

accepted(func, args \\ [])

Returns ESpec.ExpectTo argument to call ESpec.Assertions.ThrowTerm assertion

Source
be(value)

Alias for eq/1

Source
be(operator, value)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.Be asserion.

Source
be_atom()

Returns ESpec.ExpectTo argument to call ESpec.Assertions.ByType assertion

Source
be_between(min, max)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.BeBetween asserion.

Source
be_binary()
Source
be_bitstring()
Source
be_boolean()
Source
be_close_to(value, delta)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.BeBetween asserion.

Source
be_empty()

Returns ESpec.ExpectTo argument to call ESpec.Assertions.Enum.BeEmpty assertion

Source
be_float()
Source
be_function()
Source
be_function(arity)
Source
be_integer()
Source
be_list()
Source
be_map()
Source
be_nil()
Source
be_number()
Source
be_pid()
Source
be_port()
Source
be_reference()
Source
be_tuple()
Source
change(func, value)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.ChangeTo assertion

Source
change(func, before, value)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.ChangeFromTo assertion

Source
eq(value)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.Eq asserion.

Source
eql(value)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.Eql asserion.

Source
expect(value)

Wrapper for ESpec.ExpectTo.

Source
have(val)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.Enum.Have assertion

Source
have_all(func)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.Enum.HaveAll assertion

Source
have_any(func)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.Enum.HaveAll assertion

Source
have_at(pos, val)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.Enum.HaveAt assertion

Source
have_count(val)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.Enum.HaveCount assertion

Source
have_count_by(func, val)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.Enum.HaveCountBy assertion

Source
have_first(value)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.List.HaveFirst assertion

Source
have_hd(value)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.List.HaveHd assertion

Source
have_last(value)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.List.HaveLast assertion

Source
have_max(value)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.Enum.HaveMax assertion

Source
have_max_by(func, value)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.Enum.HaveMaxBy assertion

Source
have_min(value)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.Enum.HaveMin assertion

Source
have_min_by(func, value)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.Enum.HaveMinBy assertion

Source
have_tl(value)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.List.HaveTl assertion

Source
match(value)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.Match asserion

Source
raise_exception()
Source
raise_exception(exception)
Source
raise_exception(exception, message)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.RaiseException asserion.

Source
throw_term()
Source
throw_term(term)

Returns ESpec.ExpectTo argument to call ESpec.Assertions.ThrowTerm asserion.

Source