disu.se

ObjectClass

Namespace

Lookout::Expected

Ancestors
  1. Value

  2. Object

Subclasses
Array

Represents expected ::Arrays.

Classes::Exception

Represents expected values that are descendants of ::Exception.

Exception

Represents expected ::Exceptions.

FalseClass

Represents expected FalseClasses (of which false is the only instance).

Hash

Represents expected ::Hashes.

Actual::Method

Represents expected ::Lookout::Actual::Methods.

Not::Method

Represents expected ::Lookout::Actual::Not::Methods.

Output

Represents expected ::Lookout::Outputs.

Reception

Represents expected ::Lookout::Receptions.

Warning

Represents expected ::Lookout::Warnings.

Module

Represents expected ::Modules.

Range

Represents expected ::Ranges.

Regexp

Represents expected ::Regexps.

String

Represents expected ::Strings.

Symbol

Represents expected ::Symbols.

TrueClass

Represents expected TrueClasses (of which true is the only instance).

Represents expected ::Objects. This is the base expected-value class and may be subclassed if you have a type that would benefit from more specific treatment than what this class affords. Such a subclass should override #expect and/or #difference to set up type-specific expect blocks and/or difference checks and difference report generation.

Constructor

initialize(expected::Object)#

Wraps the expected value.

Instance Methods

expect(file::String, line::Integer){ |expected::Object|::Object … }Expect::Object#

Returns an expect block for the receiver at line in file that’ll yield the #expected object and expect an object that’ll exhibit no #differences from it to be returned.

difference(actual::Object)Difference::Object?#

Returns a difference report between actual and #expected unless they’re #==.

expected::Object#

Returns the expected value.