Class: Lookout::Output
Overview
Output expectation proxy. Used to expect output on an IO object during the execution of an expect block.
Direct Known Subclasses
Instance Method Summary collapse
-
#diff(other) ⇒ Enumerable<String>
An Enumerable over the formatted operations that would have to be applied to the actual output to get the expected output.
- #inspect ⇒ Object
-
#to_lookout_expected ⇒ Expected::Lookout::Output
A wrapper around the receiver, making it an expected value.
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.
15 |
# File 'lib/lookout-3.0/output.rb', line 15 def diff(other) expected.to_lookout_expected.difference(other.expected).diff end |
#inspect ⇒ Object
10 |
# File 'lib/lookout-3.0/output.rb', line 10 def inspect; 'output(%p)' % expected end |
#to_lookout_expected ⇒ Expected::Lookout::Output
Returns A wrapper around the receiver, making it an expected value.
19 |
# File 'lib/lookout-3.0/output.rb', line 19 def to_lookout_expected; Lookout::Expected::Lookout::Output.new(self) end |