ESpec.Expect

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

Source

Summary

be(value)

Alias for eq/1

be(operator, value)

Returns ESpec.To argument to call ESpec.Assertions.Be asserion. Can be used with w(> < >= <= == != === !== <> =~)a

be_between(min, max)

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

be_close_to(value, delta)

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

eq(value)

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

eql(value)

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

expect(value)

Wrapper for ESpec.To. Passes the value returned by the block

match(value)

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

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

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

throw_term()
throw_term(term)

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

Functions

be(value)

Alias for eq/1

Source
be(operator, value)

Returns ESpec.To argument to call ESpec.Assertions.Be asserion. Can be used with w(> < >= <= == != === !== <> =~)a.

Source
be_between(min, max)

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

Source
be_close_to(value, delta)

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

Source
eq(value)

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

Source
eql(value)

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

Source
expect(value)

Wrapper for ESpec.To. Passes the value returned by the block.

Source
match(value)

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

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

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

Source
throw_term()
Source
throw_term(term)

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

Source