/usr/lib/ruby/vendor_ruby/aruba/matchers/command/have_output_size.rb is in ruby-aruba 0.14.2-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # @!method have_output_size(output)
# This matchers checks if output has size.
#
# @param [String] output
# The content which should be checked
#
# @return [TrueClass, FalseClass] The result
#
# false:
# * if output does not have size
# true:
# * if output has size
#
# @example Use matcher
#
# RSpec.describe do
# it { expect(file1).to have_output_size(256) }
# end
RSpec::Matchers.define :have_output_size do |expected|
match do |actual|
next false unless actual.respond_to? :size
@actual = actual.size
values_match? expected, @actual
end
description { "output has size #{description_of expected}" }
end
|