disu.se

ExpectModule

Namespace

Lookout

Function-like namespace for type-specific expect blocks. Represents the “expect” keyword in expectation files. Used by Expectations::Context.

Object is the base class for all classes defined under this namespace, so look to it for guidance.

Children

Classes

Namespace for expect blocks for types under the Expected::Classes namespace.

Exception

Expect block of Expected::Exceptions.

Object

Expect block of Expected::Objects.

Class Methods

expect(expected::Object, file::String, line::Integer, &blockProc)#

Wraps the creation of an Object or one of its sub-classes by dispatching #to_lookout_expected on the expected value and then calling #expect on the result, passing the expanded path to the file containing the expectation, the line in file on which the expectation is defined, and the block to evaluate for the actual result.

If #to_lookout_expected raises NoMethodError, the result will be an Object, so that at least something gets set up.

ReturnsObject

The result of calling expected#to_lookout_expected#expect(file, line, &block)