Class: Lookout::Literal

Inherits:
Object show all
Defined in:
lib/lookout-3.0/literal.rb

Overview

Proxies objects that should be literally expected. This is achieved by overriding #to_lookout_expected to wrap the object in a Expected::Object instead of using whatever #to_lookout_expected on the object would normally return. This allows us to expect a literal Range instead of allowing either a Range or an item included in the range.

Instance Method Summary collapse

Instance Method Details

#inspectObject



13
# File 'lib/lookout-3.0/literal.rb', line 13

def inspect; 'literal(%p)' % output end

#to_lookout_expectedExpected::Object

Returns An expected value wrapper around the expected value.

Returns:



17
# File 'lib/lookout-3.0/literal.rb', line 17

def to_lookout_expected; Lookout::Expected::Object.new(@expected) end