Class: Lookout::Output

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

Overview

Output expectation proxy. Used to expect output on an IO object during the execution of an expect block.

Direct Known Subclasses

Warning

Instance Method Summary collapse

Instance Method Details

#diff(other) ⇒ Enumerable<String>

Returns An Enumerable over the formatted operations that would have to be applied to the actual output to get the expected output.

Returns:

  • (Enumerable<String>)

    An Enumerable over the formatted operations that would have to be applied to the actual output to get the expected output



15
# File 'lib/lookout-3.0/output.rb', line 15

def diff(other) expected.to_lookout_expected.difference(other.expected).diff end

#inspectObject



10
# File 'lib/lookout-3.0/output.rb', line 10

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

#to_lookout_expectedExpected::Lookout::Output

Returns A wrapper around the receiver, making it an expected value.

Returns:



19
# File 'lib/lookout-3.0/output.rb', line 19

def to_lookout_expected; Lookout::Expected::Lookout::Output.new(self) end