@api private Provides the implementation for `output`. Not intended to be instantiated directly.
@api private @return [String]
# File lib/rspec/matchers/built_in/output.rb, line 54 def description if @expected "output #{description_of @expected} to #{@stream_capturer.name}" else "output to #{@stream_capturer.name}" end end
@api private @return [Boolean]
# File lib/rspec/matchers/built_in/output.rb, line 64 def diffable? true end
# File lib/rspec/matchers/built_in/output.rb, line 22 def does_not_match?(block) !matches?(block) && Proc === block end
@api private @return [String]
# File lib/rspec/matchers/built_in/output.rb, line 42 def failure_message "expected block to #{description}, but #{positive_failure_reason}" end
@api private @return [String]
# File lib/rspec/matchers/built_in/output.rb, line 48 def failure_message_when_negated "expected block to not #{description}, but #{negative_failure_reason}" end
# File lib/rspec/matchers/built_in/output.rb, line 15 def matches?(block) @block = block return false unless Proc === block @actual = @stream_capturer.capture(block) @expected ? values_match?(@expected, @actual) : captured? end
@api private Indicates this matcher matches against a block. @return [True]
# File lib/rspec/matchers/built_in/output.rb, line 71 def supports_block_expectations? true end
Generated with the Darkfish Rdoc Generator 2.